xboxscene.org forums
OG Xbox Forums => Software Forums => Development => Topic started by: SHiZNO on April 17, 2003, 10:08:00 PM
-
hold on
-
have a look a the D3DXMatrix* functions...
-
you looking to trace a vectors path in 3d space? given the pitch and yaw of the vector, you can figure it out using spherical coordinates. I used a vector calculus book to figure them out but they should be in a good geometry text too.
-
well im no help with the rotation but...
the cos of an angle can be represented by x
and sin .... y
like you already said.
z is just z. there is no trig funtion that can be sub. for it
im not ezaclty sure what your trying to do but like someone else already said, you might want to check out spherical.. but maybe even cyclendrical might be worth checking out. maybe even polar?
-
dude, if you want to use euler angles do it like this...
float heading = DegreeToRadian(your_heading);
float pitch = DegreeToRadian(your_pitch);
pos- = ( pos
- + cosf(pitch) * distance * sin(heading) );
pos[y] = ( pos[y] + sinf(pitch) * distance);
pos[z] = ( pos[z] + cosf(pitch) * distance * cos(heading) );
dont forget use a time scale on distance or else your movements going to be dependant on framerate.
enjoy :-)