PDA

View Full Version : determining points in space



teflon_dragon
04-02-2002, 06:25 AM
Hey everybody, I'm back! Thanks again for all your help.

I have a math question. How do I determine which way an object (my flying pyramid) is pointing, and then when an event happens that dictates that the object should move in that direction, how do I go about moving it in that direction?

- = TEFLON DRAGON = -

nexusone
04-02-2002, 07:04 AM
First you should know which way you object is pointing! Because it only points in the direction you tell it.

Have you got to the point where you are using variables to hold the current position of your object?

example:

My_object
{
int x, y, z; Location of your object.
int direction_x, direction_y, direction_z; // direction of movement of the object.
int angle; 0 = forward, 180 = looking backwards, etc.
// you may also want to add things like:
int object_speed; 0 = Stopped, > 0 moving.
}


Originally posted by teflon_dragon:
Hey everybody, I'm back! Thanks again for all your help.

I have a math question. How do I determine which way an object (my flying pyramid) is pointing, and then when an event happens that dictates that the object should move in that direction, how do I go about moving it in that direction?

- = TEFLON DRAGON = -