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
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