WorldToObjectTransform gives me a Vector3D that, when added to the
original Vector3D, would get me to the destonation Vector3D, if I
understand correctly:
relativeVector3D = enemy.WorldToObjectTransform(player.position)
From this, if I wanted to, I could get the x and y difference from
enemy to player:
relativeVector3D.position.x
relativeVector3D.position.y
How can I get the relative angle from enemy to player?
(That way I could try to turn my enemy towards the player)
I know I could do some trig with the x and y positions easily enough,
but I'm thinking there is a more efficient method with Vector3D that
I'm just not gleaning from the Language Reference.
This is a 2D environment, BTW.
Thanks,
Paul Kaiser
_______________________________________________
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|