I need a little clarification on how to use this function. Mainly on the structure of a angular velocity vector. Also I am wondering how I could use this angular velocity vector to make an object make itself copy another objects orientation using .worldOrientation.
Angular velocity is just the angular velocity at the current logic tick from the physics engine. Just directly assign the rotation using worldOrientation.
I want it to slowly move to position with physics stopping the movement if it is in the way. obj1.worldOrientation = obj2.worldOrientation just doesn’t cut it.
I have a ragdoll of which I am trying to animate. So I am trying to set the angles of the ragdoll bone to match an armature. If I use obj1.worldOrientation = obj2.worldOrientation the limbs will snap to their positions with no “give” because they are there next frame. Using angular velocity makes the limbs “glide” there with an editable force. Though as I keep testing I find my ragdoll to spaz out, which is currently what I am trying to fix.
I never worked on a ragdoll. As far as I understood the concept you use an invisible physics model to simulate ragdoll (with rigid body joints etc.). To make it visible you copy the orientations of the ragdoll components to the bones of the armature.
You do not smooth out anything. This is done by the physics engine on the calculated physical behavior.
@marcolT,
I have been trying many different methods, using rotation matrices and quaterions. I can’t seem to get anything to work properly so I am dropping it from my game for the moment. but here is my quaternion code, it also doesn’t work well.