# Resolving vectors in 3 dimensions

This topic is 4906 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## 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 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 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;

1. 1
2. 2
Rutin
21
3. 3
A4L
15
4. 4
5. 5

• 13
• 26
• 10
• 11
• 44
• ### Forum Statistics

• Total Topics
633742
• Total Posts
3013630
×