Sign in to follow this  

Basic 3D vector/movement question

This topic is 3376 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

Given an object w/ the following attributes: Position (Vector) Speed (Float) Direction (Unit Vector) I want to update my object's Position. If a Time component is also available(like amount of time passed since last Move update) am I thinking about this right? NewPosition(Vector) = Position + Speed * Time * (Direction) i.e. By Scaling the Direction unit Vector by multiplying it by Speed and Time does that leave me with a Vector that represents the amount of distance traveled? TIA

Share this post


Link to post
Share on other sites
Speed and Direction can be used together, they are a vector called Velocity.

Generally with velocity we call it magnitude and Direction. They can be drawn graphically as an arrow vector, where the length of the arrow is the vector magnitude and the direction is the direction indicated by the arrow.

The futuure position of an object is then:

dP = Vdt

Change in position = Velocity x Change in time

Where dt is your timestep, which for accuracy should ideally be an infinitesimal (smaller the better). So you would add the position change to your previous position to calculate a future position from velocity.

Share this post


Link to post
Share on other sites

This topic is 3376 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this