traingle rotation angles
Blitz3D Forums/Blitz3D Programming/traingle rotation angles
| ||
Is there any way I could get the yaw pitch and roll of a triangle from a surface that belongs to a mesh?. I use camera pick to select the triangle and I want to place a plane right above the selected triangle. thank you |
| ||
Just use AlignToVector using the normal of the picked triangle (PickedNX(), PickedNY(), PickedNZ()). |
| ||
doesnt seem to work...Local x = PickedX() Local y = PickedY() Local z = PickedZ() PositionEntity portal1,x,y,z AlignToVector portal1,PickedNX(),PickedNY(),PickedNZ(),1 AlignToVector portal1,PickedNX(),PickedNY(),PickedNZ(),2 AlignToVector portal1,PickedNX(),PickedNY(),PickedNZ(),3 I wrote this. Somehow if I point at the same quad multimple times some planes are rotated in a way and other in the oposite way... |
| ||
You should only need one AlignToVector. |
| ||
What one though... This used to do my head in... I think it's the Y axis? |
| ||
It depends which way his quad, 'points'. ;) |