I am trying to develop a radar for a Space Sim and was wondering if anyone knows of a good way of mapping radar objects' 3d position to a 2d radar.
Let me try to clarify what I mean. The radar that I'm trying to implement is just like the radar used in games such as X-Wing, Tie-Fighter, Xwing vs Tie, and X-Wing Alliance. If you haven't played any of those great games (go to the bargin bin and pick em up b/c they are worth a play), then I'll describe how the radar works. You have 2 radar circles, one in each top corner.
One is used for the objects in front of your ship and one in the back. The objects in the front radar showed the position of the object in relation to the direction your ship is facing.
So if you are facing dead on the object, then the object will be in the middle of the radar. If the object is 90 degress left of where your facing, then in the radar the object will be all the way on the left in the middle of the circle.
Here is a screen shot of the current hud and in the top is where I will be drawing the objects in the radar.
Let me recap
* I have the 3d position of the objects
* I have the 3d position of my ship
* I have the rotational information about all axis of my ship
Trying to map objects in the radar.
Thanks for the help.