Jump to content
  • Advertisement

Archived

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

tiwummbihaou

direction of an object

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

hi again, how do i find the direction of a man for example so that i will make him walk at that direction? do i substract the position of his nose(since it is at the way he looks) from the position of his head? or what shall i do? i also want my camera to follow the man, as he rotates i want my camera to rotate around the man with the same angle so that the camera both sees the man from the back and sees where the man looks at.. please give precise examples or some piece of code that i can understand and resite it in my game..i have been working on this for so long yet i haven''t got a result.. thnx

Share this post


Link to post
Share on other sites
Advertisement
Wrong forum (I think).

Keep track of the man''s direction within your program. Make variables inside the man''s class or structure that store his direction. When the user rotates the man, update these variables, and draw according to them.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!