|
![](/i/fill.gif) |
David Fontaine wrote:
> Yes!
8< Snip
> // Reorient from <0,0,1> to p
> #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;
8< Snip
Just a little suggestion for the last of these lines:
#local RotX = degrees(-atan2(p.y, vlength(p*(x+z)));
Regards
Tor Olav
--
mailto:tor### [at] hotmail com
http://www.crosswinds.net/~tok/tokrays.html
Post a reply to this message
|
![](/i/fill.gif) |