Add frame of reference?

I have a elevator, it does not work as smoothly as I hoped,
The logic is working fine, but the physics…

is there any way to use python to add the change in position of the elevator to the player gracefully?

right now the mesh moving into the player “pops” him up.
I need him to ride it like a person.

WSAD - move
E spawn “activator”

Hit pillar next to player to engage elevator


TramLogicStartB.blend (576 KB)

This doesn’t sound like a great solution, but you could use setLinearVelocity on the player when the elevator activates to get him moving the proper speed. There might be some physics settings or something you could change, but I have virtually no knowledge of how physics properties work in Blender

Before you complain about the player having jerky motion, make the thing he’s on have smooth motion. It looks to me like it’s teleporting upwards in quantized steps. If the elevator has smooth motion, then the player will work properly.

I agree with sdfgeoff, the elevator teleports into the player.

Bullets performs the typical reaction, it tries to push the rigid body out of the block.

As a workaround you could parent the player object to the ground. This way it looses the physics reaction but it does not jump.

I do not have a good solution for you. My last elevator was a rigid body following an animated “hook”. I never finished it.

I remade it :smiley:

this is a rbj elevator (needs player interface sending messages instead of key presses)

but “X1” is adjustable so I can tinker until I like it.

press 1 or 2 or 3 (numpad?) I use emulate numpad


RBJElev.blend (556 KB)

Ok, now I killed gravity (it’s for a space station) and added normal gravity…

and a timer and greater forces on the doors,

still needs some fine tuning


RBJElev (1).blend (645 KB)

Hehe, if you go from 1, tap 2 and then press 3 quickly, you can throw the player off the top!

What’s stopping you just using a bunch of animations? With some nifty programming you could cut it down to three animation sequences:

  1. Start from one floor
  2. Travel up one floor
  3. Stop for the next floor

By shifting the origin point of the animation each time, I think you could get a smooth motion.

The other alternative is a PID control system (thanks for introducing me to them Mobius), which would take the current position, the target position, and output a force. But that would take more processing power than it probably should.

Maybe I’ll try my hand at elevators one of these days.

Hi, nice elevator movements :eyebrowlift:
I am so in with scripting, but you could maybe parent (with “parent” actuator) the character to your elevator as soon as a numpad-key is pressed, and remove parent as soon your character move out off the elevator.

For elevators I simply use actions and it seems to work nicely (with a dynamic object player). Basic test attached.

Ok here it is, no actions, no RBJ’s

Just logic :smiley:


BasicElevRev2.blend (554 KB)

And with some frills like labels on buttons and camera rigged up


Logic Map


BasicElevRev3.blend (572 KB)