• Advertisement

Archived

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

Help with rotation and transformation

This topic is 6038 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, i need some help. I want to implement a 3 person model and move it around in a static environment. Exactly like "Resident Evil". My problem is I can only increment the Z axis but if I rotate I would like to go towards the direction my model is facing. I''m not necessarily looking for code but just the idea of how to implement this or a formula. I''ve actually created this type of movement before a long time ago, but when I look at my crappy code I cannot piece it together (must have been lucky). Any help would be appreciated. -W

Share this post


Link to post
Share on other sites
Advertisement
Try this ''pseudo code''

First, define which AXIS of the person is front (usually Z)

Rotate object
Get Z vector from orientation (3rd row from matrix)
Multiply that vector by a speed factor.
Translate the object by the vector.


And you should have it.

Other ay is to create a vector which the only component is the direction you want (for Z it would be V=(0,0, 10)) and transform it by the orientation matrix and in the end translate the object !

Share this post


Link to post
Share on other sites
Thank you, I''ll try that. I appreciate your response.
-W

Share this post


Link to post
Share on other sites

  • Advertisement