sql_lall
Dec 29th, 2003, 03:02 AM
Hey, i thought this was best suited to maths... cos 3D graphics is always maths...
anyway
I have a camera in a 3D world. I don't use quaternions to represent it (i know, bad...) but instead have its position (one point in space) and its rotation (another point, {x,y,z} representing the x-, y-, and z- rotation.
Now, moving in direction facing, and strafing is easy, as it involves movement of the position point. However, how would it be possible to rotate the camera say {l,m,n} degrees WITH RESPECT to the current viewing angle of {a,b,c} degrees? This is for doing things such as turning left, looking up, and then doing both at the same time.
Unfortunately you can't just put new rotation to be {a+l,b+m,c+n}, not to use a simple matrix multiplication, as the point is really a rotation, not a point as such.
Just wondering, is it possible say to make a mock unit vector pointing in the default direction (up = +ve y axis, forwards = +ve z axis) then rotate that and use its new position to help find the rotation needed??
anyway
I have a camera in a 3D world. I don't use quaternions to represent it (i know, bad...) but instead have its position (one point in space) and its rotation (another point, {x,y,z} representing the x-, y-, and z- rotation.
Now, moving in direction facing, and strafing is easy, as it involves movement of the position point. However, how would it be possible to rotate the camera say {l,m,n} degrees WITH RESPECT to the current viewing angle of {a,b,c} degrees? This is for doing things such as turning left, looking up, and then doing both at the same time.
Unfortunately you can't just put new rotation to be {a+l,b+m,c+n}, not to use a simple matrix multiplication, as the point is really a rotation, not a point as such.
Just wondering, is it possible say to make a mock unit vector pointing in the default direction (up = +ve y axis, forwards = +ve z axis) then rotate that and use its new position to help find the rotation needed??