traingle rotation angles

Blitz3D Forums/Blitz3D Programming/traingle rotation angles

Sanctus(Posted 2008) [#1]
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


big10p(Posted 2008) [#2]
Just use AlignToVector using the normal of the picked triangle (PickedNX(), PickedNY(), PickedNZ()).


Sanctus(Posted 2008) [#3]
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...


big10p(Posted 2008) [#4]
You should only need one AlignToVector.


Ross C(Posted 2008) [#5]
What one though... This used to do my head in... I think it's the Y axis?


big10p(Posted 2008) [#6]
It depends which way his quad, 'points'. ;)