Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Help with rotation and transformation


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 wh0mk   Members   -  Reputation: 122

Like
Likes
Like

Posted 13 July 2001 - 01:00 PM

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

Sponsor:

#2 Akura   Members   -  Reputation: 130

Like
Likes
Like

Posted 13 July 2001 - 01:31 PM

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 !

#3 wh0mk   Members   -  Reputation: 122

Like
Likes
Like

Posted 13 July 2001 - 02:00 PM

Thank you, I''ll try that. I appreciate your response.
-W




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS