I know most books only talk about the first derivative of orientation and most engines only implement the first.
I saw these functions last night and they were in my head all morning. I am currently on the train home and i though i should just ask before i arrive.
Code: Select all
q'(q,w) = 1/2qw //W = anglar velocity transformed into quarternion [w,0]. you knew that.
We should not multiply quaternions with scalar values (As quaternions should ideally be unit when we multiply them with other vectors)
Hence 0.5f*q should be
Code: Select all
slerp(Quaternion.Identity, q, 0.5f);
Secondly Angular acceleration has me a bit confused.
Code: Select all
//q = orientation
//W = anglar velocity transformed into Quarternion [w,dot].
//dot = -2w'.w' //. = dot product
//w' = q' //first derivative
q"(q,w,w') = 1/2qw
Do you use Quaternion.Dot(-2w',w') or -2 * Quaternion.Dot(w',w')?
the final code
Code: Select all
//mimicing s= ut +1/2at^2
q(t+dt) = q(t) + q'*dt + 1/2q"dt^2;
Would all these lerping and damping that occurs after not increase the amount of error in the system?
If you use the physics for some controlled system would it not save you all that extra control logic if every thing was slerped?
This is probably stupid and I am probably over thinking it.