Player Falling Through Elevator

In my scene I have an elevator where the player can walk on and it will move up. I created an animation for it and used this script to activate it.

function OnTriggerEnter (other : Collider) {

The problem is whenever the player walks on the elevator and it starts moving the player falls right through the floor. I think it might be something to do with the player. Thanks for any help.

You will want to put a game object just under the elevator floor with a box collider, make sure that box collider is set to NOT be a Trigger.

The problem your having is that you've set the elevator to be a trigger but as a trigger doesnt actively collide with other objects (It just sends events when things go through it) your character is falling through it.

Give me a shout if that works, if not drop me a message here.

Have you got the charactermotor or other such script attached to the player object?

(not sure on wiether this will work with animation but does work with scripted movements.)

just duplicate your elevator and turn off the mesh renderer. it will provide 2 checks for the mesh collision instead of just 1. this has fixed problems for me in the past with animations and falling through during movement.

Do you know OnTriggerEnter need the is Trigger(True) right?

logging_out, did you get a solution to this as I’m having the same problem. I’m using a 3rd person controller and I do have the Normal Character Motor script on him as well.

But each time I step on the platform it raises but only takes my character about half way up before he just falls through it.

I’ve tried doubling the mesh as well. Nothing.

Make sure you add a capsule collider to your character controller and tick is trigger instead of your platform as the trigger, also when it says do you want to replace the existing collider just click add.