Is there a way i can have my object be a trigger but can interact with a other objects
My object has to touch an object and then can do something to do this i used triggers But the problem is that my gameobject fall through plathform which it is supposed to stand on Is there a way to prevent while still have the trigger on
Answer by andzq · Nov 01, 2020 at 02:26 PM
Yes. Assuming that "my object" is a player, "an object" is an invisible box and "plathform" is the ground.
You just need to give your player two collider components, one with "IsTrigger" checked, one with "IsTrigger" unchecked. The invisible box needs a collider with "IsTrigger" checked and the ground needs a collider with "IsTrigger" unchecked.
Colliders of player and ground physically collide and stop player from falling through the ground
Triggers of player and invisible box can overlap to trigger events but do not block movement