0

By default kinematic actors in PhysX will simply push controllers out of the way or ignore them:

http://youtu.be/2bJDOjFIrRI

This is obviously not the desired behavior for things like elevators or escalators. I'm unsure on how to actually 'stick' the controller to the platform to make sure the player doesn't fall off.

I tried adding the kinematic target offset of the platform to the displacement vector when moving the controller every simulation step, however that doesn't prevent the 'pushing' from the kinematic actor and wasn't very accurate either.

How is this usually accomplished? The documentation mentions using obstacles for moving platforms, but I don't see how that would help in this case.

I'm using PhysX 3.3.0.

Silverlan
  • 2,783
  • 3
  • 31
  • 66

1 Answers1

0

You may create virtual PxScene which represents moving platform. Its space will be considered as local space of the platform, so children controllers won't be pushed at all. Moreover you may add colliders prevented controller to move outside boundary of the platform.

Obviously, the disadvantage of the method above is using virtual scenes and multiple controllers. You will have to enhance your actors, add them ability to switch current scene. Moving platforms will also have to be more elaborated (they will need triggers to generate corresponding events of scene changing).

As regards the advantages, you will receive (for free!) precise kinematics of actor standing on horizontally moving platform.