How to keep a physics object moving (Havok)

I think I am probably just mis-understanding how this works. I would like to create a ‘box’ containing some objects (for ease of discussion, lets just use a couple of spheres), then apply an impulse to the spheres and have them move forever (i.e. perfectly elastic collisions),

My understanding was that setting friction to 0 and restitution to 1 on the PhysicsAggregates and then using setLinearDamping(0) would be enough, but the spheres still seem to slow down as they collide with each other and the walls?

In theory, yes. In practice, I’m not sure this is possible because of float precision and other factors.
I would suggest to add a collision callback and add a small impulse. Or increate the linear velocity from time to time.

1 Like

I’m glad I am not mad at least! I was planning to try and fix it exactly as you said with an onBeforeRenderObservable update to the linear velocity vector, but then just started to think that I must be missing something…

1 Like