The angle of a triangle/surface from NX,NY and NZ

Blitz3D Forums/Blitz3D Programming/The angle of a triangle/surface from NX,NY and NZ

Ross C(Posted 2004) [#1]
Hey, i'm doing a linepick down from my characters position, and i need to know the actual angle the surface is at. I would use the normals, but if the triangle is angled on the X and Z axis, then the normals don't give the correct answer really. Am i explaining this correctly? :o)

Basically, if the character stands on a surface that slopes too much, the character will slide.


jfk EO-11110(Posted 2004) [#2]
Probably you should check if PickedNX, PickedNY or PickedNZ are within a legal range before you apply gravity.


Caff(Posted 2004) [#3]
Can you explain why are you doing this? You can use non-sliding ellipse-poly collisions and a vertical linepick for gravity.


fredborg(Posted 2004) [#4]
slope# = Cos(TriangleNormalY#)

Though it won't tell you the direction of the slope...


Ross C(Posted 2004) [#5]
Well, if the character stands on a certain angle of slope, he should slide down it. It's ok, i think that NY does it for me. Thanks for the help :o)