Here’s my problem and the thing i do not understand.
I got an elevator with the following parts ( see screenshot )
- Platform - Empty object, with a Scale of 1.0, which is moved by the elevator script
- Platform.Physical - the visible mesh and the ground collider
- Platform.Attach - trigger-collider that makes the player a child of itself
- The player is a Unity.CharacterController moved in Update
- The elevator script moves the Platform in Update
I got debug lines showing, that the player character while being a child of Platform.Attached is moved by the exact amount that the whole platform is moved.
This works flawlessly while moving upwards, but moving downwards, the player OnTriggerExits the attach-collider.
The player is a CHILD of the collider and has ZERO movement in local space relative to the collider, they are both moved by the parent of the collider. Yet the OnTriggerExit happens.