KaRRiLLioN 0 Posted October 1, 2003 I want to set the direction of an object so it always faces the direction of another object regardless of where they are in relation to each other. What calculation can I use to accomplish this? Share this post Link to post Share on other sites
raedor 8 Posted October 1, 2003 not tested:<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_objA setDir (asin ((position _objB select 2)-(position _objA select 2)/(_objA distance _objB))) Share this post Link to post Share on other sites
KaRRiLLioN 0 Posted October 1, 2003 Hmm, I seem to get a direction between 4 and 10 degrees with that. Wish I could remember more of my Trig lessons from college. Share this post Link to post Share on other sites
Sgt_Wilson 0 Posted October 1, 2003 What about the DoWatch command? Or this function over at OFPEC DirToObj Function Share this post Link to post Share on other sites
KaRRiLLioN 0 Posted October 1, 2003 The DirtoObj is purrrrrfect! Thanks! Share this post Link to post Share on other sites