Jump to content
  • Advertisement
Sign in to follow this  
VISQI

Radar positions?

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

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
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.

Share this post


Link to post
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 this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!