#### Archived

This topic is now archived and is closed to further replies.

# 3D Collision physics problem

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

## Recommended Posts

This problem deals with the direction and magnitude an object will take on after hitting and bouncing of the ground or some irregular terrain object. Problem: An object lands on a piece of angled terrain and bounces, which direction will it bounce in? (in X,Y,Z velocity vector coordinates) example, if the terrain was flat, y velocity would reverse its direction, x and z velocitys will stay the same. How can you calculate the x y and z final velocities if all you know is the X slope (in y = Mx) and Z slope (in y = Mz) ? Disregard all other environmental dependencies, ex. gravity, friction, object dimentions. Any solutions, ideas, comments, or suggestions will be greatly apreciated, being as I am lozing sleep over this algorithm

##### Share on other sites
Use the normal of the terrain and your direction vector to obtain the new direction vector. The new vector will lie on the on the other side of the plane that contains the normal and is perpendicular to the plane of the normal and (old) direction.

ie, direction vector d, terrain normal n
plane P contains d and n
plane Q contains n and is perpendicular to P (with n as the axis of intersection)
new direction vector d'' lies on the other side of Q.

##### Share on other sites
hmm, this may sound trivial, but since I cant figure out how to do the normal vector correctly, can someone plz post an equation to use or a link to documentation on vectors?

thx