Hi all,
I'm trying to implement a "radar" that tell you where
is the enemy shooting to you.
Really, the radar is a 3d sprite in front of the camera
and the things I would like to know is how could I rotate
this sprite depending of the global coordinates of
your enemy and the angle in which the player is looking.
For example, supposing that the radar is a arrow bitmap pointing to the top of the screen, the result should be:
If your enemy is in front of you, the arrow rotation should
be really small (almost 0)..
If you turn 90 degreess to the right, for example, the enemy
is positioning at your left, at this moment, the arrow should be rotated to the left 90 degress...
I've tried a lot of ways but my results are a completely
disaster.. I've tried with TformPoint but I don't know
how to manager this function and, in the better option,
if this function could help me to do this.
Please, someone could help me?
Thanks in advance!
Regards
I'm trying to implement a "radar" that tell you where
is the enemy shooting to you.
Really, the radar is a 3d sprite in front of the camera
and the things I would like to know is how could I rotate
this sprite depending of the global coordinates of
your enemy and the angle in which the player is looking.
For example, supposing that the radar is a arrow bitmap pointing to the top of the screen, the result should be:
If your enemy is in front of you, the arrow rotation should
be really small (almost 0)..
If you turn 90 degreess to the right, for example, the enemy
is positioning at your left, at this moment, the arrow should be rotated to the left 90 degress...
I've tried a lot of ways but my results are a completely
disaster.. I've tried with TformPoint but I don't know
how to manager this function and, in the better option,
if this function could help me to do this.
Please, someone could help me?
Thanks in advance!
Regards