Havok: Rolling sphere on flat surface (and in the air) rubber bands at speed

See title.

Been stuck on this and I can’t recreate it in the playground without the sphere launching itself skywards.

gravity = new Vector3(0, -9, 0)

sphere = MeshBuilder.CreateSphere('ball', {diameter: 2, segments: 32}, scene)
floor = MeshBuilder.CreateBox('floor', {width: 20, depth: 400, height: 1}, scene)

floorAggregate = new PhysicsAggregate(floor , PhysicsShapeType.MESH, { mass: 0 }, scene);

sphereAggregate = new PhysicsAggregate(sphere, PhysicsShapeType.SPHERE, { mass: 1, restitution:0}, scene);

window.addEventListener('keyup', (e) => {
  if (e.key === ' ') {
      console.log('Spacebar key is pressed!');

      sphereAggregate.body.applyForce(new Vector3(400, 0, 0), new Vector3(0,0, 0))

}, false)

I’ve tried applyForce and applyImpulse and they both cause the same rubber banding issue. I think it has something to do with rotation and speed. Has anyone else come across this issue or have any workarounds for me?

Video of rubber banding

It looks like the normal issue with Mesh shape. How To Preventing Character Bounce on Flat Terrain? - #16 by ertugrulcetin

are you using the latest version? Also, don’t forget to set the friction to a lower value (like 0 and increase until you get the expected effect)

I was using the most up to date version 1.1.1 @babylonjs/havok. It turns out, 2 hours ago there was a new update (1.1.2) and it fixed the problem to a certain degree.

I forgot to mention that I also tried the floor with a standard box shape (without the hole) and friction to 0 on both and it still persists, so I don’t believe that it was the same problem that you linked.

The rubber banding problem still persists randomly as you’ll see near the end of the attached video. Also returns to the bugged original rubber band state in the original post, when the window loses focus and regains focus before applyForce or impulse (something to do with sleep maybe?).

Havok 1.1.2 SemiFixed Video

Maybe it’s the frame delta time. Can you please try with fixed deltatime by setting 1st parameter to false ?

Works perfectly now thank you. Could you elaborate why this was a problem and what “true” would be used for?

_useDeltaForWorldStep set to true: physics resolution time step corresponds to framerate.
_useDeltaForWorldStep set to false: each physics time step duration is the same.