x'=z*sin(yaw)+x*cos(yaw)
y'=y
z'=z*cos(yaw)-x*sin(yaw)
x"=x'
y"=y'*cos(pitch)-z'*sin(pitch)
z"=y'*sin(pitch)+z'*cos(pitch)
x"'=y"*sin(roll)+x"*cos(roll)
y"'=y"*cos(roll)-x"*sin(roll)
z"'=z"
ok with this i sould be able to move an abject in roll pitch and yaw. Lets say i set the setposition command to use the varibles spx,spy,spz. The if i wanted to yaw say 2.0f what math would i use. The truth is im pretty confused on this math.
setposition help in getting this matrix to work
The problem of getting the ship to roll pitch and yaw is good. Thanks to arras for the tips on the matrix4.
But now it seems all was for naught as we are having a hard time getting a camera to set in the cockpit of the ship and do the same rotation as the ship. So the pilot can know how his ship is positioned and what is right in front of him.
we tried to setTarget to the getrotation of the ship. That seemed like it should have worked. But setTarget is not where the camera should be pointing but what it is pointing at.
not sure what to do now.
But now it seems all was for naught as we are having a hard time getting a camera to set in the cockpit of the ship and do the same rotation as the ship. So the pilot can know how his ship is positioned and what is right in front of him.
we tried to setTarget to the getrotation of the ship. That seemed like it should have worked. But setTarget is not where the camera should be pointing but what it is pointing at.
not sure what to do now.
you can find my cockpit camera here:
http://irrlicht.sourceforge.net/phpBB2/ ... php?t=2892
parent node is ship node to which camera is attached as child.
target vector v actualy dont have to be vector3df(0, 0, 100) enough is vector3df(0, 0, 1)
http://irrlicht.sourceforge.net/phpBB2/ ... php?t=2892
parent node is ship node to which camera is attached as child.
target vector v actualy dont have to be vector3df(0, 0, 100) enough is vector3df(0, 0, 1)