Jump to content

View more

Image of the Day

The night is still, but the invasion brings chaos. #screenshotsaturday #hanako #indiegame #gameart #ue4 #samurai https://t.co/cgILXuokoS
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Help with rotation and transformation

4: Adsense

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   

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

#2 Akura   Members   

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   

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.