Help with Quat manipulation....

BlitzMax Forums/BlitzMax Programming/Help with Quat manipulation....

The r0nin(Posted 2008) [#1]
I have the starting point for a path (say it is x=0, y=50, and z=30). I have an Euler converted to a Quat for the original facing of a curved path (call it "dir" and it was 0,0,90 in pitch,yaw,and roll) and a Euler converted to a Quat for the final facing of the path (the "bend" which is 0,-30,0). What I need to know how to calculate is the final coordinates (x1,y1,z1) of the path if the path is 15 units in length.

As far as I can tell, I multiply dir by bend to get the Quat describing the final rotation. How do I then use the resulting Quat mathematically to get the final position (x1,y1,z1) 15 units from the original position? Any help from the experts would be greatly appreciated...


The r0nin(Posted 2008) [#2]
OK... I found out that I need to normalize the Quats after multiplying them. What's next... multiplying the resulting quat by the quat equivalent of 15,0,0?


Damien Sturdy(Posted 2008) [#3]
I would think you convert the quat to a vector in some way, then multiply that by 15,15,15.


The r0nin(Posted 2008) [#4]
Here's what I have so far... I have two different methods of rotating the objects (moddir and mod2dir) but neither matches up with the actual angling of the object and it's movement. The quat and vec3 code is from Leadwerk's code. I'm stumped...