Posted: 14th Jun 2007 4:19
Im looking for a good function that will work out what y angle my object needs to be inorder to face a certain set of world coordinates.
Posted: 14th Jun 2007 6:41
Kind of like the "point object" function? If so, this may work:
+ Code Snippet
function PointObjectY(obj,x#,y#,z#)
   oax#=object angle x(obj)
   oaz#=object angle z(obj)
   point object obj,x#,y#,z#
   xrotate object obj, oax#
   zrotate object obj, oaz#
endfunction


I hope that helps.


Cheers,

-naota
Posted: 14th Jun 2007 14:23
Else you could use the "atanfull"-function and use the X- and Z-Difference of the points (object-position and target-position) as parameters.
That should return the needed Y-Angle then, I think..