Jump to content
  • Advertisement

Archived

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

MindCode

Rotation expressed as a normal.

This topic is 5585 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

I''m pretty sure there must be a way to do this which I haven''t found yet. Can you use the x,y,z rotation (which will represent a players spacial orientation) to obtain a vector normal that will also represent the direction they face from their position? You will not beleive how long I''ve been working on this problem, and it is of the most serious importance to me.

Share this post


Link to post
Share on other sites
Advertisement
Seems like you could. Assuming the direction is (1,0,0) then you rotate around the z axis with from x to y postive then your point becomes (cz,sz,0). You then rotate around the y axis so your y remains unchanged and your point becomes (cz*cy,sz,cz*sy). So maybe (cz*cy, sz*cx-cz*sy*sx, cz*sy*cx+sz*sx) or some similar combination. cx would be cos(x) and sx sin(x) and similarly for y and z.

Share this post


Link to post
Share on other sites
Thanks. I was thinking something with the cos/sin pairs, but what I''ve tried hasn''t worked so far. I haven''t tried the rotation formula though. I guess I won''t have to normalize this.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!