Radar positions?

Started by
2 comments, last by mmakrzem 12 years, 5 months ago
so, i am trying to make a 3D maze game with a radar showing the maze and small dots on the radar to indicate the player and the enemy's position.
i created the game, and the radar quad and rendered it with normalized device coordinates on the forth quadrant, but i just cant transfer the positions from the game to the radar as dots.

The maze starts from 0 and ends and 50 in both the z and x axises, but how can i represent a position of (0.0f, 0.0f, 10.0f) in the actual game on the radar as a dot???
Advertisement
Get the coordinates of he objects relative to the player, then simply scale those coordinates, then add those coordinates to the center of the quad representing the radar. Well, what part do you have problem with? This problem is actually really simple to solve.

Get the coordinates of he objects relative to the player, then simply scale those coordinates, then add those coordinates to the center of the quad representing the radar. Well, what part do you have problem with? This problem is actually really simple to solve.



i really didn't get what you said, but the coordinates of the player and the objects are in world space from (0.0f,0.0f,0.0f) -> (50.0f, 0.0f, 50.0f). I am just trying to represent those coordinates on a quad.
I should switch the y and z axis, since it is a 2D Quad.

My question is: since i rendered the quad in normalized device coordinates, how can i change the scale of coordinates to the quad's coordinate system???

I tried to scale the coordinates to (0,1). didn't work. I left the coordinates from (0,50), and it didn't work too.

The quad is showing up, and the pixel shader is getting input(i know this because i make a maze image on paint and set it up on the pixel shader as a texture and it is showing up. the only thing missing are the dots representing the positions of the enemies and the player).
Have a look at video #25 from my webiste: http://www.marek-knows.com/downloads.php5?vmk=ghost25b1

In the video I show you exactly how to program a radar unit and how to make objects in a 3D world pop up on the radar unit shown in the corner of the screen.

This topic is closed to new replies.

Advertisement