Radar/Minimap?

So I did use the search function but I haven’t been able to find anything that suits my needs. What I need to do is have a radar that shows red dots for certain objects and a blue/green dot for my character not any of the enviroment, just how far they are away from my character, like Halo’s radar. The game is a collecting game and a radar would be useful for finding the things you need to collect, how would I go about doing this?

No one? I’m sorry if I’m a bit impatient it’s just that I would really like to get this done.

you measure your level width and depth (if it’s static just write it down somewhere), also measure the min. points if they’re different than 0.
then you get the object x and z position and substract level minx and minz respectively. Then you divide the outcome by the width and depth ending up with 0-1 value. Then you multiply the values by radar texture width and height getting points where to draw the red/blue spots

radarX=((playerX-minLevelX)/levelWidth)*radarTextureWidth
radarY=((playerZ-minLevelZ)/levelDepth)*radarTextureHeight

You may try the following link: http://www.unifycommunity.com/wiki/index.php?title=Radar

Ok so I modified the code a small bit and got it to work good. I just have to problems, how would I go about having it rotate with me so that the blips on the screen would be directionally correct based on my orientation, also how would I go about have the blips always stay on the texture, and not having them only come on the radar when your close to them? Thanks.

Here’s the code I’m using.

@script ExecuteInEditMode()
// radar! by PsychicParrot, adapted from a Blitz3d script found in the public domain online somewhere ..

//Modified by Dastardly Banana to add radar size configuration, different colors for enemies in different states (patrolling or chasing), ability to move radar to either one of 9 preset locations or to custom location.

//some lines are particular to our AI script, you will need to change "EnemyAINew" to the name of your AI script, and change "isChasing" to the boolean within that AI script that is true when the enemy is active/can see the player/is chasing the player.

var blip : Texture; // texture to use when the enemy isn't chasing
var radarBG : Texture;

var centerObject : Transform;
var mapScale = 0.3;
var mapSizePercent = 15;

enum radarLocationValues {topLeft, topCenter, topRight, middleLeft, middleCenter, middleRight, bottomLeft, bottomCenter, bottomRight, custom}
var radarLocation : radarLocationValues = radarLocationValues.bottomLeft;

private var mapWidth : float;
private var mapHeight : float;
private var mapCenter : Vector2;
var mapCenterCustom : Vector2;

function Start () {
    setMapLocation();   
}

function OnGUI () {
//  GUI.matrix = Matrix4x4.TRS (Vector3.zero, Quaternion.identity, Vector3(Screen.width / 600.0, Screen.height / 450.0, 1));

    // Draw player blip (centerObject)
    bX=centerObject.transform.position.x * mapScale;
    bY=centerObject.transform.position.z * mapScale;   
    GUI.DrawTexture(Rect(mapCenter.x - mapWidth/2,mapCenter.y-mapHeight/2,mapWidth,mapHeight),radarBG);
    
    // Draw blips for Enemies
    DrawBlipsForEnemies();
    
}
  
function drawBlip(go,aTexture){
    
    centerPos=centerObject.position;
    extPos=go.transform.position;
    
    // first we need to get the distance of the enemy from the player
    dist=Vector3.Distance(centerPos,extPos);
     
    dx=centerPos.x-extPos.x; // how far to the side of the player is the enemy?
    dz=centerPos.z-extPos.z; // how far in front or behind the player is the enemy?
    
    // what's the angle to turn to face the enemy - compensating for the player's turning?
    deltay=Mathf.Atan2(dx,dz)*Mathf.Rad2Deg - 270 - centerObject.eulerAngles.y;
    
    // just basic trigonometry to find the point x,y (enemy's location) given the angle deltay
    bX=dist*Mathf.Cos(deltay * Mathf.Deg2Rad);
    bY=dist*Mathf.Sin(deltay * Mathf.Deg2Rad);
    
    bX=bX*mapScale; // scales down the x-coordinate so that the plot stays within our radar
    bY=bY*mapScale; // scales down the y-coordinate so that the plot stays within our radar
    
    if(dist<=mapWidth*.5/mapScale){ 
        // this is the diameter of our largest radar circle
       GUI.DrawTexture(Rect(mapCenter.x+bX,mapCenter.y+bY,4,4),aTexture);
 
    }
 
}
 
function DrawBlipsForEnemies(){
    //You will need to replace isChasing with a variable from your AI script that is true when     the enemy is chasing the player, or doing watever you want it to be doing when it is red on    the radar.
    
    //You will need to replace "EnemyAINew with the name of your AI script
    
    // Find all game objects tagged Enemy
    var gos : GameObject[];
    gos = GameObject.FindGameObjectsWithTag("Food"); 
 
    var distance = Mathf.Infinity; 
    var position = transform.position; 
 
    // Iterate through them and call drawBlip function
    var go : GameObject;
        for (go in gos)  { 
          var blipChoice : Texture = blip;
          drawBlip(go,blipChoice);
        }
        
    }

function setMapLocation () {
    mapWidth = Screen.width*mapSizePercent/100.0;
    mapHeight = mapWidth;

    //sets mapCenter based on enum selection
    if(radarLocation == radarLocationValues.topLeft){
        mapCenter = Vector2(mapWidth/2, mapHeight/2);
    } else if(radarLocation == radarLocationValues.topCenter){
        mapCenter = Vector2(Screen.width/2, mapHeight/2);
    } else if(radarLocation == radarLocationValues.topRight){
        mapCenter = Vector2(Screen.width-mapWidth/2, mapHeight/2);
    } else if(radarLocation == radarLocationValues.middleLeft){
        mapCenter = Vector2(mapWidth/2, Screen.height/2);
    } else if(radarLocation == radarLocationValues.middleCenter){
        mapCenter = Vector2(Screen.width/2, Screen.height/2);
    } else if(radarLocation == radarLocationValues.middleRight){
        mapCenter = Vector2(Screen.width-mapWidth/2, Screen.height/2);
    } else if(radarLocation == radarLocationValues.bottomLeft){
        mapCenter = Vector2(mapWidth/2, Screen.height - mapHeight/2);
    } else if(radarLocation == radarLocationValues.bottomCenter){
        mapCenter = Vector2(Screen.width/2, Screen.height - mapHeight/2);
    } else if(radarLocation == radarLocationValues.bottomRight){
        mapCenter = Vector2(Screen.width-mapWidth/2, Screen.height - mapHeight/2);
    } else if(radarLocation == radarLocationValues.custom){
        mapCenter = mapCenterCustom;
    }
    
}

You may also look at this link: http://dastardlybanana.com/radarPage.htm. I have not use this one yet, but it sounds pretty good.