Hey,
In a 3D platformer, I have platforms that suddenly explode / disappear. I achieve this by disabling the mesh collider on a script attached to the platform, something like:
GetComponent<MeshCollider>().enabled = false;
Issue: when I do this while the player is on the platform, it does not trigger OnCollisionExit on the script attached to the player. However this script is responsible for telling if the player is touching the ground or not.
- Is there a way to make the platform disappear AND still trigger OnCollisionExit?
- Should I create a custom event that somehow tells the player that a platform disappeared? How to detect if it is still touching ground in this case?
- Should I deactivate the platform differently?
Thanks for your help!