Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

nick5454

Pitch is isn't going directly up

This topic is 5221 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Subtract the vector then normalize it: D3DXVec3Subtract(&vDiff, &vPos, &vDest ); D3DXVec3Normalize(&vTempDiff, &vDiff); fRoll = sin((double)vTempDiff.z); fPitch = sin((double)vTempDiff.y); fYaw = sin((double)vTempDiff.x); y is heading up the values are fRoll = 0.0 fPitch = -.84 fYaw = 0.0 so when I apply yaw pitch and roll its forcing the z to be positively incremented. Is this true or is there an error in my yaw, pitch, and roll calculations. I would think they could be isolated? Nick

Share this post


Link to post
Share on other sites
Advertisement
This is by no means supposed to answer your question, but aren''t yaw, pitch and roll relative to the orientation of the object?

Share this post


Link to post
Share on other sites
quote:
Original post by uber_n00b
This is by no means supposed to answer your question, but aren''t yaw, pitch and roll relative to the orientation of the object?

Yaw, pitch, and roll themselves describe orientation They''re relative to a base direction, usually one of the principle axis (ex. 0,0,1 or 1,0,0).

If your pitch is -0.84 (and yaw and roll are 0), then using DirectX coordinates and the principle direction 0,0,1 your object should experience an increasing z and decreasing y when moved in that direction.

I can''t say if there''s any error in the pitch calculation because I don''t know what the differential vector is. If there is a non-zero y value, then there will be non-zero pitch.

Share this post


Link to post
Share on other sites
yeah and thinking about it .84 is probably like 80 degrees so of course there would be an increment. I need to check my math.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
God I hate yaw, pitch, and roll. I wish they would die.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!