Havok : changing plane orientation with a rolling sphere

Hello babylon JS Community,

I’m trying to do a first demo project with havok, a dynamic ground plane orientation with a rolling sphere.
The unexpected behavior : Sphere pass trough the ground when fast changing plane orientation.

Havok sample tilt plane with rolling sphere issue | Babylon.js Playground (babylonjs.com)

Thank for your help.

Hi @Sebastien_C and welcome to the forum!

I think changing ground orientation with a key event is not a good idea.
This event happens maybe 10times a seconds with a rendering of 60+ Hz
I would try to do the rotation every frame with a value that depends on the current key state (up or down)

1 Like

Thank @Cedric, it is indeed better.
I try several engine and scene event to update the plane orientation at each frame,
But the sphere still pass trough the ground, I don’t know if i can get more stable result.

I edit the playground:
Havok sample inclined plane with rolling sphere issue | Babylon.js Playground (babylonjs.com)

I will continue to experiment, thank for your help.

1 Like

Although you can set transforms directly, Havok seems to prefer setting velocities on kinematic bodies:

1 Like

Havok friends said setting target with optional interpolation can be another good option, which auto updates velocity. About Havok feature - #15 by eoin . I guess that lets you address the problem using location / distance… easier for small brains like mine

1 Like