misho wrote:Ok - I started my project by creating 2 bodies using exact same method - one Kinematic, one Dynamic. Dynamic falls, and Kinematic is suspended in the air, because it does not react to forces, as you mentioned. From the code, I ascertained that Dynamic body is a subclass of Kinematic body, and the Kinematic body is a subclass of nBody (base class). So - can you tell me what a sample practical purpose would be of a Kinematic body? A hard wall, or a cliff... an immovable object? Is that what a STATIC body used to be in 3.xx? (If I remember correctly).
in the SDK, triggers and player capsules are kinematic objects.
but in your case the plain will also be a kinematic object,
you can since of the planer as some special player capsule.
you can see the class hierarchy by opening the dixigen file.
misho wrote:ndVector CalcAverageOmega(const ndQuaternion &q1, ndFloat32 invdt) const;
Do I subtract one from the other?
you do not subtract them, I expressed as a subtraction because that's how the derivation of the function is realized. It is from calculus, the limit of two quaternion when time step approach zero, and come out to be
dQ/dt = 0.5 * omega * Q
it is a tedious derivation, but it is in many books and papers, ex:
https://ahrs.readthedocs.io/en/latest/f ... gular.htmlbut you do not have to worry about that, that function implements the formula for you.
it is my fault that you get confused. I did not statef clear how to use the function.
once you calculate q0 and q1 from the matrices. the formula is
- Code: Select all
ndVector omega = q0.CalcAverageOmega(q1, invdt)
so you can see where to plug q0, q1 and time step.