CharacterController not moving with kinematic platform (moving plane goes through character)

Hi,

I’m using PhysicsCharacterController and facing an issue with its kinematic behavior.

In this Playground, I created a static physics body (a plane) that moves up and down constantly. When I jump on top of that plane, I expected the platform to carry the character along with it, but instead, the character seems to go through or jitter, as if the platform doesn’t push or move it properly.

It feels like the CharacterController isn’t reacting to kinematic/animated physics bodies.

How can I update or configure the CharacterController so that moving or kinematic platforms can carry, push, or affect the character’s movement?

Here’s the playground, just jump on the moving plane to see the issue: https://playground.babylonjs.com/#6J2BTU

cc @Cedric

@Cedric In the CharacterController class, there’s a _createSurfaceConstraint function.

On line 529, there’s a TODO comment saying // <todo Need hknpMotionUtil::predictPontVelocity

Could this be related to that TODO?

This is threejs example, I’d like to have moving kinematic platforms like these that carry the character: https://character-control.vercel.app/

Yes, I looks related. I’ll do my best to take a closer look in the coming days.

1 Like

That’d be great @Cedric. Then we will have a fully featured physics-based character controller. I think this is the only missing feature, otherwise, it is perfect and I love using it!

1 Like