• ### What is your GameDev Story?

#### Archived

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

# Any vector movement system tutorials?

This topic is 5825 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hello everyone, I have wrote some codes to make my model walk in a 3D world. However, I think it is too simply and it may incorrect. So I want to know is there any tutorials about a vector movement system? Such as one teaches about how a model walk in a 3D world by using the vector mathematics or how to calculate which direction the model is facing in the world. Thank you very much.

##### Share on other sites
Just a quick note...
Depending on what kind of world and how complex it is, you could use a heading variable.
Assign a single point of your world (X=0,Y=0,Z=0) so that it is a heading point. (so you know where it is)
Initialise a variable to zero maybe called "heading".
whenever you turn left it will decrease the heading variable and when you turn right it will increase the heading variable.... think of it as a circle.
** make sure you start by looking at the point of heading **

I doubt this will work well on it''s own if your game area has vertical movement in it though..

{
/* so that if you have done a full turn it goes back to zero, plus the extra turn you may have made.... not very clear, but I''m not a teacher.... just a somebody with an idea.
/*
}

well, just a ''quick'' note ....... kinda.... hope it helps

I am a fish...... I am out of the water .... Damn

##### Share on other sites
Thank you very much.

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 14
• 14
• 45
• 22
• 27
• ### Forum Statistics

• Total Topics
634044
• Total Posts
3015208
×