## Vector on slope

say you have this plane

ax + by + cz = d

you know the normal of the plane (vector perpendicular to it) is (a, b, c), so to find a vector that lies on the plane pick any vector not equal to (a, b, c) and find the cross product of it and the plane's normal.

A vector doesn't have speed, but you could possibly increase the magnitude, i.e. (a, b, c) -> (k*a, k*b, k*c) would make it k times 'faster'.

ax + by + cz = d

you know the normal of the plane (vector perpendicular to it) is (a, b, c), so to find a vector that lies on the plane pick any vector not equal to (a, b, c) and find the cross product of it and the plane's normal.

A vector doesn't have speed, but you could possibly increase the magnitude, i.e. (a, b, c) -> (k*a, k*b, k*c) would make it k times 'faster'.

Sir, e^iÏ€ + 1 = 0, hence God exists; reply!

Here's my code:

http://www.solarfusionsoftware.com/devel...lision.zip

To move the point into the plane just use the w,s,a,and d keys and you can rotate everything with the t,g,f,h keys

Update:

I realized that it looked like the plane was being shifted in the opposite direction so I used this formula: Ax + By + Cz -D = S and it worked. Now I'm wondering why is Paul's formula wrong? I still can't get point to follow the slope. Instead it flys off in a different direction. Can you add it to my collision code so I can see what you're talking about? I want the point to follow the slope like this mario game: http://www.gotoandplay.it/_articles/2003...nd_run.php .