MiniMap/Radar
Blitz3D Forums/Blitz3D Programming/MiniMap/Radar
| ||
K Wot is the best way to make a minimap/radar in Blitz3D Ive got the camera set at an isometric style view looking at the terrain but i need a minimap/radar which will show the terrain from a top down view and also show enemy placements How do i go about setting this up??? Thanks GIMPY :) |
| ||
Why not just use a second camera placed directly up? Have you looked at my "Radar with True Bearing" example in 3DGraphics Archives? It took me quite awhile to get that figured out but it works. Doggie |
| ||
Thanks m8 ill look into that example Thanks GIMPY :) |
| ||
Ok i had alook the radar bit seems ok but the camera above method just blows the polys through the roof lol ill keep trying tho :) Thanks GIMPY :) |
| ||
I did something similar in one of me first blitz programs a long time ago. twas a 2D view of a 3D terrain for a racing type game. what I did was; have a 2D version of your terrain (top-down view) with roughly the same dimensions (same wxh ratio anyways). then get the players positions on the real terrain and translate them to 2d coordinates. then take the rotation of the real terrain, as opposed to the 2D mapview into account, and devide the resulting x,y coords by the scale difference of the real terrain/2D map. than you have a set of x, y coords which represent the players position on the 2D mapview. to render them onto the actual mapview, just add the mapviews x and y offset to the x and y coords and ur set. mmm that explaination prolly doesnt make it any clearer, but it did work like charm :) |
| ||
What Defiance said ! :) |
| ||
lol @ wedoe and thanks defiance ill see wot i can come up with using ur idea Thanks GIMPY :) |
| ||
My RTS map is set up in a large grid, so it's easy to find out whats on each grid, and draw accordingly. |
| ||
Translating from 3D to 2D coordinates is simple. CameraProject will project a 3D coordinate (entityx, entityy and entityz of each entity) into 2D coordinates. Get the result using ProjectedX() and ProjectedY() You may want to "feed" CameraProject an x and z in place of an x and y (swap them around or shuffle until happy) to return 'useful' ProjectedX() and ProjectedY() coords. So, divide these results to fit a smaller rectangle, and offset to draw where you want in your minimap. |
| ||
Ahhh thanks Rob i wondered wot CameraProject did lol Thanks GIMPY :) |