This topic is 2596 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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???

##### Share on other sites
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.

##### Share on other sites

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).

##### Share on other sites

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.

1. 1
2. 2
Rutin
16
3. 3
4. 4
5. 5

• 11
• 26
• 10
• 11
• 9
• ### Forum Statistics

• Total Topics
633722
• Total Posts
3013538
×