how to calc force for rotation match

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By ywaby

refer article from Hairibar.Ragdoll page 18.

here is my code

k=angular_stiffness/(delta*delta)
k=get_inverse_inertia_tensor()*k
d=?
move_to=rotation_to(basis,target_transf.basis) #move_to is quaternion
target_vel=rotation_to(target_pre_transf.basis,target_transf.basis)/delta
var vel_diff=target_vel-get_angular_velocity()
force=k*move_to+d*vel_diff
apply_torque(force) 

my confuse is how to use inverse_inertia_tensor. and how to calc k,d ?