Havok Precision

I think I got it to work.

More detailed comments in the updated playground.

I used two methods of bypassing object sleep, but also had to apply gravity with applyForce().

Two methods from the forums are: 1) ActivationControl and 2) apply zero force.

You may want to play around to see which method(s) are really necessary. When I did so, only applyForce() gravity seemed necessary.

My biggest find is that these methods don’t seem to apply to the physics engine’s gravity (is this a bug in the engine?). So I set the engine gravity to 0.01 (didn’t want to use zero in case that was interpreted as special) and then apply the equivalent force of gravity to the objects and had to do so each physics frame.

Lastly, I applied a linear damping factor so I could test more quickly. You should be able to remove the damping to more closely match your original, but it takes a really long time to settle (5-10 minutes, but it doesn’t REALLY settle completely).

It’s hard to tell if ActivationControl actually makes a difference since it doesn’t appear to work for gravity which means we then applyForce() gravity, which happens to be the other method that the forums suggest will bypass sleep.

5 Likes