Search Unity

3D Radar UI : Beta-2d July-22-2016

Discussion in 'Assets and Asset Store' started by ForceX, Feb 23, 2011.

  1. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    Yup I got one on order! I got to see a much older version with an 1080 display that did not use the OLED and I could not see any screen window. It is much smoother. I can only imagine the new OLED will be even better.

    I got the basics of the radar as C# meaning target range detection and target display on the radar with zoom / boost. Next is getting the HUD in place, but probably after I burn through the new Diablo expansion.
     
  2. BrotenStudios

    BrotenStudios

    Joined:
    Feb 13, 2014
    Posts:
    155
    Ya on my Rift the screen door effect is hardly noticeable especially in outer space environments. I normally run my Rift at 1080p on my iMAC. As long as my eyes are tricked to try and focus on the distance I never notice the effect.
     
  3. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    Space does help mask the effect :)

    Depending on your rate of turn the screen door / pixel introplation can still be seen but you have to look for it a bit harder. What I meant by screen window was the lines between the pixels appeared to be gone which makes for a much more enjoyable viewing experience as it no longer looks like you are viewing the world through a screened window. I believe the OLED version in the DK2 produces richer colors and has better contrast. I am excited to receive one!
     
  4. Catboiler

    Catboiler

    Joined:
    Mar 2, 2014
    Posts:
    5
    Hi there, just come across the Radar and it is just what I'm looking for. I'm playing around with the Rift as well, but I'm having an issue just getting the basic part of it working. Probably mny own fault, but haven't been able to identify the cause of the issue. I've followed the docs and set it up as far as I can see the same way as the demo scene, but I'm getting two errors when I try and add one POI. (a) Game Object can only be on one layer, and (b) iit's telling me that the variable status bar (I have disabled the status bars for the moment, but had the error when they were enabled) in the Mgr script needs to be assigned. I cannot find anywhere on the Inspector that I can assign something to it.
    Noob questions I know, but some help would be appreciated.

    Cheers
     
  5. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    Hi Catboiler,

    1. Status Bars : Check your status bar and see if the "Bar Type" is set to Manage Existing. If so click the fold out to assign your status bar gameobject to the Object property field.

    2. POI : Can you provide the error? This should work exactly like a target. Assign the FX_3DRadar_RID script to an object and enable IsPOI. Make sure you have run the FX_Faction_Mgr on your _GameMgr first. To be safe click on both the Factions and Faction Relations tab then click update. I need to change how the inspector works.

    The current scripts will work with okish with the Rift. Just make sure you are applying your Lens Correction after you are through rendering everything.

    SkyBox Cameras (depth -4)
    Player View Cameras (depth -3)
    Radar Cameras (depth -2)
    Extra Stuff Cameras (depth -1)
    Oculus Rift Camera with Lens Correction (depth 0) Cull all layers so it renders nothing. This will only apply lens correction to all cameras below it's depth.
     
    Last edited: Mar 25, 2014
  6. RowdyMrB

    RowdyMrB

    Joined:
    Dec 8, 2012
    Posts:
    83
    ForceX
    Sounds like good progress on the C# implementation....Certainly understand putting it on hold till you get through the new Diablo expansion ;-) My development has slowed down as I work through Titanfall. If you are going to make games you gotta love playing them.
     
  7. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
  8. Catboiler

    Catboiler

    Joined:
    Mar 2, 2014
    Posts:
    5
    Status Bars seem o be sorted now, thanks, but the POI layering thing is still there. Below is the error I'm getting. As far as I can tell, I've followed the documentation so all the scripts execute in the right order. I've attached the RID script to my object, set it to faction 0 and POI. That's it. i'm wondering if it's something to do with the Rift, and having 2 HUD layers, or something like that?

    Ta for your help and quick response.

    A game object can only be in one layer. The layer needs to be in the range [0...31]
    UnityEngine.GameObject:set_layer(Int32)
    FX_3DRadar_RID:SetLayer() (at Assets/ForceX 3D Radar/Scripts/FX_3DRadar_RID.js:1017)
    FX_3DRadar_RID:SetPOIRender() (at Assets/ForceX 3D Radar/Scripts/FX_3DRadar_RID.js:656)
    FX_3DRadar_RID:UpdateRID() (at Assets/ForceX 3D Radar/Scripts/FX_3DRadar_RID.js:291)
    FX_3DRadar_RID:LateUpdate() (at Assets/ForceX 3D Radar/Scripts/FX_3DRadar_RID.js:150)

    UPDATE: Testing it, it will still run with the above error, but the target marker does appear on the radar.
     
    Last edited: Mar 25, 2014
  9. Catboiler

    Catboiler

    Joined:
    Mar 2, 2014
    Posts:
    5
    Another slightly noob question I guess. Rather than rendering the radar to a fixed point on the screen (so it moves with the head tracking), can I set it to render at a fixed point on the model (eg looking around the spaceship, to see the radar on a panel or wall or something like that?) If so, how?

    Thanks

    Looking good and easy to use (which is a good thing for me :))
     
  10. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    Yes. If you have Unity Pro you can render the radar to a texture. If not there is an included way to anchor the radars camera window to an object. This has limitations as the radar cannot go outside the players field of view as it will cause out of bounds rendering errors. Bot of these options can be found under the same drop down menu that allows you to select the radar window position on the screen. Sorry i do not have access to Unity / 3d Radar while i am at work so i cannot give you the exact names of the menus.

    POI : I'll have to look at this when i get home. I don't believe i have tested POI with the Rift yet.
     
  11. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    The only way i can recreate this error is by changing the name of the layer Radar_Contact. Make sure the layers are named exactly as they are in the docs. Layer names are case sensitive. It does not matter which layer the names are in just make sure they they are typed correctly and do not have any phantom spaces at the end.

    Radar_Layer_1
    Radar_Layer_2
    HUD_Layer_1
    HUD_Layer_2
    Radar_Contact
    Obstruction
     
    Last edited: Mar 25, 2014
  12. Catboiler

    Catboiler

    Joined:
    Mar 2, 2014
    Posts:
    5
    Yep, my fault. I'd named Radar_Contact Radar_Tag for some reason. Never thought to look there.
    (Ahem).

    Another question though. I've rendered the radar to a texture (a cube in the ship), looks good. But, can I change the background opacity? I was thinking of having it like a HUD projection on the glass - very much like having it render to the camera but on a fixed point rather than follow you around?
     
  13. Catboiler

    Catboiler

    Joined:
    Mar 2, 2014
    Posts:
    5
    Ah man, gutted at the Facebook purchase of Rift!!
     
  14. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    There should be the option to set the camera’s clear flags settings. You would change this option from solid color to depth only. This should be located with the rest of the Render To Texture settings in the 3D Radar Mgr inspector. Sorry again I’m at work. I know I had this at one point. If not try an change the solid color background color to 0,0,0,0

    I wasn't all that trilled about it either. As with many others I would have liked a company that's involved with the gaming industry but that does leave few contenders, EA, Valve, Microsoft, Sony are probably the only ones that could have pulled this off. Of these options Valve is the only company i would prefer as the base tech for the Rift came from collaboration with Valve. Sony has their own VR tech so this would have led to the oculus being consumed entirely, Microsoft would put greater emphasis on the Xbox, EA would be ok i suppose, but it think they would have a stronger push towards the consoles. They all have some ties to one thing or another that could end up pushing the Rift in one direction or another.

    That almost leaves Google and Facebook. Google has there Google glasses which you can argue is the closest thing to the Rift Google is known for developing and manufacturing their own hardware. Then Facebook.... It's strange but they do have money... whch is good...

    I've read countless post about people complaining, speculating about having to view FB adds in VR and FB monitoring your actions with the motion camera on the rift is going a bit overboard. Oculus as a company will still operate interdependently as they are now. What this will allow for now with backing from FB is the ability to expand their employee base, and perform better hardware research development, IE better screens and sensors. Which is a good thing for everyone. FB's long term vision for the Rift is the ability to use it in the real world for applications such as VR face time. This is kind of interesting as it will also require the development of stereo cameras that can capture video for display in the Rift. This means wider range of native output device types for the Rift.

    In the end we will just have to wait and see.
     
  15. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    @Catboiler : Sorry but you cannot render the radar to a transparent texture as it currently is. You do have me intrigued, and I may have to look into this further in the future.
     
  16. RowdyMrB

    RowdyMrB

    Joined:
    Dec 8, 2012
    Posts:
    83
    Good assessment on the Oculus Facebook purchase. I posted something similar on another forum so I could not agree more.
     
  17. lancer

    lancer

    Joined:
    Aug 1, 2013
    Posts:
    231
    @ForceX

    Hey there,

    I'm just getting back into the unity forums after a long absence and just wanted to tell you that you are doing great work ;). Your like the second project I looked for after coming back on :p
     
  18. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    Thanks lancer!

    I understand the need to take a break and get away for awhile. I'm currently on a Diablo break, but I find that I am always thinking about Unity :)
     
  19. lancer

    lancer

    Joined:
    Aug 1, 2013
    Posts:
    231
    Is there some way I can adjust the color of the radar? I'm using it in a Helicopter fighting game I'm working on. But the whole environment is light, so the radar doesn't show up too well against the water. So I want to make it darker
     
  20. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    You can edit the Radar_Texture material and adjust the color from there. You can also change the type of shader the radar uses. By default it is using an additive shader, but you can change the shader and texture to what ever you like.
     
  21. Cryten

    Cryten

    Joined:
    Apr 29, 2013
    Posts:
    2
    Hi,

    your radar system is great and I used it in my space game but I have some issues with NAV objects.
    1. My NAV list is always empty although there are 2 gameobjects with a FX_3DRadar_RID script and under condition settings 'Is NAV' and 'Is Detectable' are enabled.
    2. The NAV object is displayed on the radar itself, but there is no yellow NAV indicator on the screen.
    3. The NAV object on the radar disappears sometimes and after flying around with my ship it appears suddenly. I think there is maybe something wrong with the units? And I'm not sure what radar range makes sense.
    4. If I arrive at the NAV object it doesn't disappear and doesn't show the next one.

    What I want is that I can define NAV gameobjects so that the player has the objective to move there and do something (like a mission).

    Have you some hints on these things?
     
  22. Cryten

    Cryten

    Joined:
    Apr 29, 2013
    Posts:
    2
    I solved the problem by creating a NAV list from within my code:

    Code (csharp):
    1. public Transform[] navArray;
    2. private GameObject gameMgr;
    3.  
    4. void Awake ()
    5. {
    6.     gameMgr = GameObject.Find("_GameMgr");
    7. }
    8.  
    9. void Start ()
    10. {
    11.     gameMgr.GetComponent<FX_3DRadar_Mgr>().CreateNAV(navArray);
    12. }
    Is this also possible with the settings ('is NAV') in the FX_3DRadar_RID editor or only per script?
     
  23. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    @Cryten :

    Thats exactly correct. You need to generate your own array of NAV points and pass that information to the radar.

    No setting an object to IsNav will not add it to your NAV list. This is needs to be handeled as you have above. This is because if you want to track a single missions nav you do not want other mission nav points showing up in the same list. So you will want to have a NAV list for each mission and pass this information to the radar when you set a mission as active.

    IsNav only changes the object's radar / hud rendering method which is different from a normal target.
     
    Last edited: Apr 3, 2014
  24. BrotenStudios

    BrotenStudios

    Joined:
    Feb 13, 2014
    Posts:
    155
    ForceX you may want to look at the new Oculus Software Development Kit Overview v0.3.1 Preview - Updated: April 14, 2014
    http://static.oculusvr.com/sdk-downloads/documents/Oculus_SDK_Overview_0.3.1_Preview.pdf

    Mainly new Distortion Rendering functions.

    Client rendered: based on the distortion
    mesh returned by
    ovrHmd_CreateDistortionMesh

    (or)

    SDK rendered: done automatically
    in ovrHmd_EndFrame


    I'll be testing the v0.3.1 SDK with my game soon.
     
  25. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    Interesting, It appears that this new mesh distortion method is also faster than the previous screen post effect shader. I'll be giving this a more comprehensive read through. Good find :)
     
  26. BrotenStudios

    BrotenStudios

    Joined:
    Feb 13, 2014
    Posts:
    155
    SDK render is even faster. And applied on rendered on end-frame draws.
     
  27. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    Here's a quick update on the c# conversion. This will be released in V2 sometime around July

    Completed:
    1. (New) Multi camera HUD element rendering assignment
    2. Orthographic HUD rendering
    3. Basic target range detection.
    4. Hidden / Stealth mode
    5. Blind Radar / Line Of Sight detection
    6. Primary HUD target selection indicators
    7. Target HUD Bounds indicators
    8. Target HUD screen edge indicators
    9. Rendering conditions for target Bounds edge indicators
    10. Radar Perspective / Orthographic views runtime switching
    11. Sort targets into proper list based on IFF status
    12. Hostile target filtering
    13. Target Lists
    14. NAV List
    15. POI's
    16. Faction Management
    17. Screen edge radar indicators are mouse selectable for target selection
    18. Automatic Radar window screen corner selection and placement.
    19. Render radar to texture (Unity Pro)
    20. User selectable HUD / RID elements to display and opacity options.
    21. (New) Option to fade out a targets Bounds and or ID Indicator based on distance.
    22. (New) Instancing of shared HUD elements. Target ID Indicators (In Rift Mode) Bounds now share mesh vertex color and material data.

    To Do:
    1. Incorporate OVR script management into the Multi camera renderer (Oculus Rift)
    2. Perspective HUD rendering (Oculus Rift) <-- Drag and drop from the Rift test
    3. HUD Directional Indicator Arrow
    4. NAV management
    5. Status Bars
    6. 2D Radar


    Fixes :
    1. HUD elements no longer jump when a target exits the screen and using a Oculus Rift camera setup.
    2. Faction Mgr inspector now properly assigns faction attributes automatically with out having to manually update and click between inspector windows.

    Changes:
    1. Reduced overdraw of radar RID elements by changing the atlas texture size from 32x32 to 16x16 reducing the mesh sizes.
     
    Last edited: May 18, 2014
  28. RowdyMrB

    RowdyMrB

    Joined:
    Dec 8, 2012
    Posts:
    83
    Great Progress ForceX! Looking forward to the release.
     
  29. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    After the c# conversion is complete I want to look into being able to have the radar as an actual object that exists in the world. Kind of like the Holographic projection you would see in Star Wars when the rebels are preparing for the attack on the Death Star or how the radars work in Star Citizen and Elite Dangerous.
     
  30. RowdyMrB

    RowdyMrB

    Joined:
    Dec 8, 2012
    Posts:
    83
    Ok so now I am really looking forward to the release. My space shooter could really benefit from that. BTW just started investing some time into Star Citizen. I have been so heads down into working on my project that I have not spent much time with it. I think it was the latest Game Informer or Edge that raised my interest and got me to take a harder look
     
  31. RowdyMrB

    RowdyMrB

    Joined:
    Dec 8, 2012
    Posts:
    83
    ForceX,
    I recently ran into a Game that makes pretty good use of the Oculus Rift. It is a Flight simulator game called DCS (Digital Combat Simulator) http://www.digitalcombatsimulator.com/en/ You might already be aware of it. It does require a good gaming rig but the Rift graphics rendering looks pretty good. Can't wait to see what it looks like with the DK2. DCS will auto detect if the rift is connected (you have to have that feature checked in settings).
     
  32. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    I will check that out, it's always fun to see what others are doing with the rift.
     
  33. RowdyMrB

    RowdyMrB

    Joined:
    Dec 8, 2012
    Posts:
    83
    ForceX,

    I need to define a target variable of type GO in a C# script base on what the current selected radar target is. However I cannot find how this is referenced in FX_3DRadar_Mgr.js I see that the current SelectedTarget variable type is Transform but where are you referencing the GO to get its transform?

    I know this will probably be easier once you get everything moved over to C# but it should only be a few lines of code to make it work for now.
     
  34. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    In the current JS version SelectedTarget[0] is your currently selected target with SelectedTarget[1] is the currently selected sub component of the current target [0].

    SelectedTarget[0] is defined by the targeting functions such as NextTarget(), PreviousTarget(), ClosestTarget() ect. The functions get the targets Transform information from the target list the targeting function is accessing IE TargetListAll, TargetListFriendly, TargetListHostile, ect.

    The players target list is updated by the target objects RID scripts. When a target enters the players radar range they add their Transform component to the proper target list in the Mgr script, and when the leave the players radar range they remove them self from any list they were part of.


    Qucik Sim

    Target
    1."I am in range of the players radar".
    2. What is my relation to the player.
    3. Add my Transform information to the correct list based on relation

    Player
    1."I want to select a target (T)"
    2. If we have a target, prepare the current target for deselection.
    3. TargetNext() Looks at the list containing all target transforms and picks the next one.
    4. SetTarget() is called and stores the new targets RID script information, preps the new target, and updates HUD textures.
     
  35. RowdyMrB

    RowdyMrB

    Joined:
    Dec 8, 2012
    Posts:
    83
    ForceX,

    That does help. I think I see now where this is taking place in RX_3DRadar_RID.js. So it looks like I will need to come up with a different approach. I am using a product called Laser_construction_kit to add different effects when firing weapons. I should be able to rewrite the scripts in this product to use the current target transform defined in your product. More coding than the other approach but doable. Thanks.
     
  36. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    Basically if you want to do something any time you select a new target i would create a new function and then call that function from the from the keypress target selection functions after they assign the target to SelectedTarget[0].


    Code (csharp):
    1. function MyFunction1(){
    2. //Do Something
    3. }
    4.  
    5. function TargetNext(){
    6. //Select The Next Target
    7. MyFunction1();
    8. }
    That will update your script to reference the current target. Then for the main loop you can do something like.

    Code (csharp):
    1. void MyFunction2(){
    2. if(FX_3DRadar_Mgr.SelectedTarget[0]){
    3. //Do Something
    4. }
    5. }
    Or if you just want to fire at the current target

    Code (csharp):
    1. void MyFunction3(){
    2. if(FX_3DRadar_Mgr.SelectedTarget[0]){
    3. //ShootAt FX_3DRadar_Mgr.SelectedTarget[0].position;
    4. }
    5. }
     
    Last edited: May 29, 2014
  37. Bellesteck

    Bellesteck

    Joined:
    Oct 9, 2013
    Posts:
    5
    Hey, quick question. the attachment to this website on the front page saves as a .PHP on my computer. (Windows 8.1, IE8?) how would I go about opening this to obtain the .unitypackage file?
     
  38. Bellesteck

    Bellesteck

    Joined:
    Oct 9, 2013
    Posts:
    5
    the problem described here was fixed by downloading the package with firefox. :D guess that fixes that. Thank you so much for providing such an amazing asset! should my game ever go anywhere, ill promote you in the credits. Cheers!
     
  39. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    @Bellesteck : If you were using IE9+ then you need to enable compatiablity mode. Or like you did use a different browser :)
     
  40. Rainking

    Rainking

    Joined:
    Jun 10, 2013
    Posts:
    41
    Hi,

    First, thank a lot for providing us this great piece of software!

    I use this radar in my space game and I try to rotate the whole radar (grid and radar contacts) when you rotate the mobile device like a compass (so the radar is facing always north). I have some issues to find a good position to attach my rotation script. Do you have a good idea to achieve this with your radar object?

    thanks a lot!
    kind regards!
     
  41. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    @Rainking : The radar it's self is not designed to rotate, but I suppose you can orbit the radar's cameras around the radar. I would create a new object at world 0,0,0 as a child of the radar. Make the cameras a child of this new object and rotate the object to orbit the cameras around the radar.

    This way when you rotate the cameras both the radar and radar contacts rotate.
     
    Last edited: Jun 26, 2014
  42. Rainking

    Rainking

    Joined:
    Jun 10, 2013
    Posts:
    41

    This works like a charm! Thx a lot! I have just one problem: unfortunately the radar contact images are not facing the camera (it depends on the initial angle). but with some minor changes in your code I can get it work.
    Thanks again! Great software! :)
     
  43. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    @Rainking : You are absolutely correct. Glad you got it working :)
     
  44. RowdyMrB

    RowdyMrB

    Joined:
    Dec 8, 2012
    Posts:
    83
    ForceX,
    i am getting back to the issue we discussed previously about targeting using the SelectedTarget variable in FX_3DRadar_Mgr. I have attached the following C# script to the _GameMgr object in the Hierarchy:

    Code (CSharp):
    1.  
    2. using UnityEngine;
    3. using System.Collections;
    4.  
    5. public class WeaponsTarget : MonoBehaviour
    6. {
    7.  
    8.     // Use this for initialization
    9.  
    10.     private FX_3DRadar_Mgr fx_3dRadar_Mgr;
    11.     private EffectSettings effectSettings;
    12.    
    13.     // Use this for initialization of Target Object
    14.  
    15.     void Start ()
    16.     {
    17.         fx_3DRadar_Mgr = GetComponent<FX_3DRadar_Mgr>();
    18.         effectSettings = GetComponent<EffectSettings>();
    19.  
    20.         effectSettings.Target = fx_3dRadar_Mgr.SelectedTarget[0].gameObject;
    21.        
    22.     }
    23.  
    24. }
    25.  
    The script accesses another C# script called EffectsSettings and that seems to be working fine. I have setup the scripts for the correct compile order. FX_3DRadar_Mgr.js is in the Assets\Standard Assets folder and WeaponsTarget.cs is in the Assets\Scripts folder. So the js script should compile before cs and be available for reference. However, no matter what I do I keep getting the error "The name 'fx_3DRadar_Mgr' does not exist in the current context". The context should be fine as my calling script is attached to the same object at the callee. Any ideas?
     
  45. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    I see what it is. It appears you have a type case issue.

    You declare fx_3dRadar_Mgr but you assign it as fx_3DRadar_Mgr. The D is upper case in your assignment but you call the lower case d later on.

    Code (csharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. public class WeaponsTarget : MonoBehaviour{
    5.  
    6.    // Use this for initialization
    7.  
    8.    private FX_3DRadar_Mgr fx_3dRadar_Mgr;
    9.    private EffectSettings effectSettings;
    10.  
    11.    // Use this for initialization of Target Object
    12.  
    13.    void Start(){
    14.         fx_3dRadar_Mgr = GetComponent<FX_3DRadar_Mgr>();
    15.         effectSettings = GetComponent<EffectSettings>();
    16.  
    17.         effectSettings.Target = fx_3dRadar_Mgr.SelectedTarget[0].gameObject;
    18.     }
    19. }
     
  46. RowdyMrB

    RowdyMrB

    Joined:
    Dec 8, 2012
    Posts:
    83
    Sorry, I saw that after my post and after correcting it I also get an UnassignedReferenceException error on effectSettingsTarget. The original error turns to: "The name 'FX_3DRadar_Mgr' does not exist in the current context" on line 10. This I am sure is leading to the second error. I just cannot figure out why I am getting the context error on FX_3DRadar_Mgr.

    Code (CSharp):
    1.  
    2. using UnityEngine;
    3. using System.Collections;
    4.  
    5. public class WeaponsTarget : MonoBehaviour
    6. {
    7.  
    8.     // Use this for initialization
    9.  
    10.     public FX_3DRadar_Mgr fx3DRadarMgr;
    11.     private EffectSettings effectSettings;
    12.  
    13.     // Use this for initialization of Target Object
    14.  
    15.     void Start ()
    16.     {
    17.         fx3DRadarMgr = GetComponent<FX_3DRadar_Mgr>();
    18.         effectSettings = GetComponent<EffectSettings>();
    19.  
    20.         effectSettings.Target = fx3DRadarMgr.SelectedTarget[0].gameObject;
    21.        
    22.     }
    23.  
    24. }
     
  47. LunguM

    LunguM

    Joined:
    Jul 19, 2012
    Posts:
    17
    This is an amazing asset, I do have one question and if it was asked and answered before I apologize for not reading the thread fully (I skimmed through most posts after a few pages).

    I am not entirely certain but it seems like the game object, _GameMgr (or one of its children), also appears on the radar during runtime with the standard "Pilot" icon.

    Is this intended or have I done something wrong when configuring the game objects?

    Thank you.
     
  48. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    @RowdyMrB : I copied your script and it works fine on my end. Look in your inspector window too see if the Mgr script is being assigned at start.

    You can try this to see if it will debug log out the name of a camera.
    Code (csharp):
    1.  
    2. using UnityEngine;
    3. using System.Collections;
    4.  
    5. public class WeaponsTarget : MonoBehaviour {
    6.  
    7.     public FX_3DRadar_Mgr fx3DRadarMgr;
    8.  
    9.     // Use this for initialization
    10.     void Start () {
    11.         fx3DRadarMgr = GetComponent<FX_3DRadar_Mgr>();
    12.         Debug.Log (fx3DRadarMgr.Cameras[0].name);
    13.     }
    14. }
    15.  
    @LunguM : Hi LunguM, Welcome to the Unity community :)

    The "Pilot" icon will only render if a gameObject has a FX_3DRadar_RID script attached and the Object Class is set to Misc --> Pilot. Does your Player gameObject have an RID script attached? If so Make sure that the RID script it is set to "IsPlayer = true". This will prevent the Players RID icon from rendering on the radar.
     
    Last edited: Jul 10, 2014
  49. LunguM

    LunguM

    Joined:
    Jul 19, 2012
    Posts:
    17
    Thank you ForceX, its great to be part of this comminity :)

    Yes the Player has the RID script attached and the "isPlayer = true" value is checked. The object was also static and when the player moved the icon remained in the same location.

    I might have accidentally added the script to one of the GameObjects in the Player's location, I will have to do a double check. (This is what happens when I push myself too much, working well after midnight).

    Thank you for the reply :)
     
  50. RowdyMrB

    RowdyMrB

    Joined:
    Dec 8, 2012
    Posts:
    83
    Odd that that it works for you. Mgr is active and the the radar is working normally in-game. I still get the ...Mgr does not exist in the current context error when declaring it. That results in the "cannot apply indexing with [] to an expression of type 'unity engine.camera' " on Debug log line. I have about exhausted all ideas. I did upgrade to the latest version of Unity. Maybe I will try and remove and reapply FXRadar.