Search Unity

How to Make Untouchable Collision Boxes to Use for Player Area Detection?

Discussion in 'Editor & General Support' started by FGPArthurVII, Jul 16, 2016.

  1. FGPArthurVII

    FGPArthurVII

    Joined:
    Jan 5, 2015
    Posts:
    106
    I wanted to make collision boxes that the player cannot touch, so I could use their height and width to make something happen when the player is at that area, in other words, when the player is in the boxes' area something would happen, I'm using it to add a counter-force to the gravity, so the player could pass on the area (ramps) without being pulled down by the gravity so we could keep the same speed when passing through ramps (solving this problem: http://forum.unity3d.com/threads/gr...-and-descents-on-the-map.416275/#post-2711870) Does anyone know how to create a collider for that use?

    Thanks;
    Arthur.
     
  2. arkon

    arkon

    Joined:
    Jun 27, 2011
    Posts:
    1,122
    Yes, set the collider to be a trigger then add the OnTriggerEnter etc events in your script that walks about the scene.
     
    FGPArthurVII likes this.
  3. FGPArthurVII

    FGPArthurVII

    Joined:
    Jan 5, 2015
    Posts:
    106