Taking a force vector of (0,100,0) and running it through this function should return the modified force vector based on the orientation of the quat...but it's not working. If I pitch or roll it acts right, but the yaw just isn't happening. Plus when you apply thrust straight up on the y-axis as long as you're straight everything is fine. But if you yaw the thrust goes down but it shouldn't. With just yawing around with no pitch or roll input, the thrust should remain constant...but it diminishes but comes back when the object is facing forward again. Still working on this...I need a beer.
EDIT: Could this be blitz3d specific problem? I don't see anyone else having this same Quat/Vector rotation problem anywhere else.
EDIT: Could this be blitz3d specific problem? I don't see anyone else having this same Quat/Vector rotation problem anywhere else.
Function QuatMulVec(r.Vector, q.Quat, v.Vector) Local vectorQuat.Quat = New Quat Local inverseQuat.Quat = New Quat Local resultQuat.Quat = New Quat vectorQuat\w = 0.0 vectorQuat\x = v\x vectorQuat\y = v\y vectorQuat\z = v\z QuatCopy(inverseQuat, q) QuatInverse(inverseQuat) QuatMul(resultQuat, q, vectorQuat) QuatMul(resultQuat, resultQuat, inverseQuat) r\x = resultQuat\x r\y = resultQuat\y r\z = resultQuat\z Delete vectorQuat Delete inverseQuat Delete resultQuat End Function