Sign in to follow this  
neiluk

Resolving vectors in 3 dimensions

Recommended Posts

Im trying to implement the phycis for an object moving down a slope of varying angle, however i can only find the relations for a slope in 2D, m*g*sin(a) etc, and i want to do it in 3D with the slope being able to be tilted in both the x and z direction. My question is how can i resolve a force vector into 3 directions rather than just 2. Or is there another way of finding the acceleation of an object down a slope in 3D?

Share this post


Link to post
Share on other sites
You are still essentially dealing with a 2D problem, so the equation you want is fine. What you want to find, I assume, is the line that the object falls along. Merely add the x vector and the z vector, and you will get a line that is dependant on the path it should be falling along.

Share this post


Link to post
Share on other sites
gravity applies as usual, only the normal force will vary.

the normal force needs to be such that the acceleration in the direction of the normal is zero.

so first do everything else, then calculate the acceleration in the direction of the normal, and substract that from the acceleration like this:

float normalacceleration = acceleration.Dot(normal);

acceleration -= normal * normalacceleration;

Share this post


Link to post
Share on other sites

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