normals help
Blitz3D Forums/Blitz3D Programming/normals help
| ||
Hi there, Given nx,ny and nz (normals) how do we determine a slope value? for example when linepicking directly down we return these normals. I would like to translate them into a workable result: a slope value between 0 and 1, with 1 being vertical and 0 being horizontal. I hope you can help :) Rob |
| ||
slope# = 1.0-CollisionNY(blablabla) |
| ||
Thanks :) |
| ||
If it's any help the components nx,ny,nz are also the direction cosines for the vector. The normal vector has length 1 and can be considered as a direction. nx = Cosine of angle between vector and positive X axis ny = Cosine of angle between vector and positive Y axis nz = Cosine of angle between vector and positive Z axis So ACos() tells you the various angles. |