I've gotten very good results with integrating Havok into my game engine. Most objects behave as would be expected. However, two of my game objects are not physically behaving as you would expect. A great sword, and a wooden spear. Sometimes, when dropped, the items will spin around on one end while leaning over very far without dropping onto their sides when you would expect them to.
Although the spear is a capsule, and the sword is a box, both of the objects are long and thin. I looked into it, and found some things mentioned in the documentation about rotational inertia, but I'm not extremely knowledgable about such things. Currently, I'm setting my rigid body inertia using hkpInertiaTensorComputer::computeShapeVolumeMassProperties(). Then after looking around, I stumbled onto hkpInertiaTensorComputer::clipInertia(20.0f,info) being used in DestructibleBridgeDemo.cpp - and, unfortunately, this is the only place I've found it being used on the entire internet. I tried using this method, and it seems to work in correcting some of the behavior of the sword and spear, but I have a few questions..
- Was I doing something wrong in the first place to cause the strange behavior? Or is this normal?
- What effect will clipInertia(20,info) have on normal objects? Am I correct in assuming that clipInertia will have no effect on objects that have relatively similar inertia on each rotational axis?
- Is there any situation where I shouldn't use clipInertia()?
- Is there a better fix for this situation?
I appreciate any informtation or advice, Thank you