Any vector movement system tutorials?
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.
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
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

I am a fish...... I am out of the water .... Damn :(
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement