Elevator???

I am trying to make an elevator using a delta time translation to move it. The problem is the player FPS prefab won’t move with it and if I try and make the elevator move up the player falls through the floor even though there are colliders.

Any Ideas?

detect if the player is on the elevator and if it is, make the elevator its parent.
if you move the elevator up / down, the player will move with it automatically

That doesn’t seem to work for going up. The player still falls through the floor. It does work for going down.

There is actually a very good tutorial on this on the Unity 3D website. Take a look at the 2D platform game tutorial. It shows you how to do the elevator.

Is this what you need? Both objects have to be rigidbodys but you can use it like translate.

I’m just using the FPS prefab which I don’t believe has a rigid body. When the elevator moves up the player moves with it for about a second and then falls through the floor. I have the script working so that the player is a child of the elevator at the time it goes up, but it’s still not working.

I believe there is a FPS controller on the wiki that is rigidbody based. I don’t know the link but I know i’ve see it there.

Here it is:

Be aware that the Rigidbody FPS Walker can climb vertical object by just walking into them and jumping continuously.