Scale PhysicsBody after collission (looking for setScalingUpdated() equivalent in Havok)

Hi,

I am trying to change the size of a sphere when it hits the ground. Here is my playground:

In the past I would use something like “setScalingUpdated()”, but that’s not available within Havok as far as I can see.

Anyone have any ideas I could try?

maybe physics body shape of Sphere is fixed
so how about this
https://playground.babylonjs.com/#Z8HTUN#197

1 Like

Yup Havok doesn’t consider the size of the scaling, so you’d need a different shape with a bigger size.

1 Like

The thing is, if you do this without changing the position of the sphere, it gets a bit stuck and slowly pushes itself out of the wall. Compared to for example ammo, the sphere will violently snap out of the wall, which is something I quite like and would like to reproduce.

Here’s an example of the sphere slowly getting pushed out:

You could do something similar by applying an impulse once the sphere hits the ground? Scale on collission | Babylon.js Playground (babylonjs.com)

2 Likes

That’s pretty close to what I was looking for, thanks!

1 Like