Advertisement Jump to content


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.

If you intended to correct an error in the post then please contact us.

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 this post

Link to post
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..

if (heading > 360.0)
heading -= 360.0
/* 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 this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!