|
|
OOPS!!!
Rotates an object to point along vector p from vector z
#macro PointTo(p)
#if (0+p.x=0 & 0+p.y=0 & 0+p.z=0)
#local RotX=0;
#else
#local RotX=-atan2(p.y,sqrt(pow(p.x,2)+pow(p.z,2)))*180/pi;
#end
#if (0+p.x=0 & 0+p.z=0)
#local RotY=0;
#else
#local RotY=atan2(p.x,p.z)*180/pi;
#end
rotate <RotX,RotY,0>
#end
David http://thunder.prohosting.com/~davidf
---------------------------------------------
AHA! I typed it right this time! Take that, Ken!
Post a reply to this message
|
|