Jump to content
  • Advertisement
Sign in to follow this  
neiluk

Resolving vectors in 3 dimensions

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

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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!