direction of an object

Started by
0 comments, last by tiwummbihaou 20 years ago
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
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.

This topic is closed to new replies.

Advertisement