Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

HUD Navigation System | Radar - Compass Bar - Indicators - Minimap

Discussion in 'Assets and Asset Store' started by SickscoreGames, Apr 23, 2018.

  1. studentvz

    studentvz

    Joined:
    Dec 14, 2014
    Posts:
    149
    Great. Thank you!

    Edit:
    The problem is that if you are not using Hud Navigation Scene Manager then
    currentMinimapProfile in HUDNavigationSystem.cs won't be initialized and MiniMap won't work.

    Open HUDNavigationSystem.cs and in Start() put this line:
    currentMinimapProfile = minimapProfile;
     
    Last edited: Jan 26, 2020
    raul3d and Slaghton like this.
  2. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    Thanks, Ill give this a go soon. Cheers.
     
  3. gearedgeek

    gearedgeek

    Joined:
    Jun 19, 2015
    Posts:
    236
    I can confirm that added that line of code will fix the MiniMap not showing the objectives. @studentz thank you for that.
     
    Ruufer, dsilverthorn and hopeful like this.
  4. Gua

    Gua

    Joined:
    Oct 29, 2012
    Posts:
    455
    I've noticed that in Compass bar icon move to fast from left to right, while compass bar background that shows direction moves more slowly. In most games speed of movement from left to right when you move camera is identical. Does anyone know how to achieve this? Here's demonstration of the issue. As you can see my marker and west indicator are both in center of compass bar, but as soon as I move camera they go out of sync.

     
  5. Freznosis

    Freznosis

    Joined:
    Jul 16, 2014
    Posts:
    298
    It's because the marker is tied to the location of an object on your screen and not the game world. You'd have to change the way markers are displayed to get your desired effect.
     
  6. Gua

    Gua

    Joined:
    Oct 29, 2012
    Posts:
    455
    I was afraid of that answer.
     
  7. MaxKMadiath

    MaxKMadiath

    Joined:
    Dec 10, 2016
    Posts:
    67
    Hi I am using the ultimate character controller and i setup HUD every works fine. But if i Exit the game by pressing the escape button it will go to the main menu. When i go to the main menu i am getting error its also bringing UCC player and HUD navigation canvas. how it came to that scene i haven't added to that seen. please help
    upload_2020-3-1_22-44-23.png
     
  8. brinca

    brinca

    Joined:
    Mar 29, 2015
    Posts:
    33
    Just a minor suggestion: there currently doesn't seem to be a way to initialize the system if the camera and/or player controller change (or are not yet available when the scene is setup), so I would suggest deferring the initialization procedure if the character controller cannot be found, instead of throwing an error.

    Here's what I changed in the implementation of HUDNavigationSystem.cs to support this, though your mileage may vary:
    Code (CSharp):
    1. void Start () {
    2.   if (PlayerController == null)
    3.     return;
    4.  
    5.   Setup();
    6. }
    7.  
    8. public void Setup(Transform playerController) {
    9.   Setup(Camera.main, playerController);
    10. }
    11.  
    12. public void Setup(Camera playerCamera = null, Transform playerController = null) {
    13.  
    14.   if (playerCamera != null) PlayerCamera = playerCamera;
    15.   if (playerController != null) PlayerController = playerController;
    16.            
    17.   currentMinimapProfile = minimapProfile;
    18.  
    19.   // ... original initialization content of the Start method ...
    20. }
    You can then call Setup() later at your leisure.
    It would be nice if this was built-in so that I don't have to re-apply the patch every time the package is updated... ;)
     
    vorokoi and dsilverthorn like this.
  9. Ruufer

    Ruufer

    Joined:
    Jul 28, 2016
    Posts:
    17
    this also fixed it for me.
     
    dsilverthorn likes this.
  10. CBam97

    CBam97

    Joined:
    Jun 26, 2018
    Posts:
    6
    Guys just wondering, how do you actually set an indicator element active/inactive? I have a number of objects with indicators on them within my scene but I don't want them all to be active at once. I can accomplish the effect by destroying the gameObject they are attached to but obviously this is not ideal.

    Thanks in advance.
     
  11. dsilverthorn

    dsilverthorn

    Joined:
    May 14, 2017
    Posts:
    835
    I have used triggers to activate or deactivate within distance.
     
  12. xsocomx

    xsocomx

    Joined:
    Apr 18, 2018
    Posts:
    34
    Hi, I am trying to set the radar panel to a separate world space canvas. I dragged the radar panel from the default HUD Navigation canvas to my world space canvas and positioned accordingly. However the radar indicators for my enemies don't show up on my radar and instead appear on the screen outside of the radar.

    How can I fix this?
     
  13. xsocomx

    xsocomx

    Joined:
    Apr 18, 2018
    Posts:
    34
    Never Mind I fixed by changing the scale of the radar panel as apposed to the canvas
     
    dsilverthorn likes this.
  14. CBam97

    CBam97

    Joined:
    Jun 26, 2018
    Posts:
    6
    Could anyone advise how I can access the Hud navigation element of an object from a separate script?

    Ie, player approaches barrel. Barrel Script handles hud navigation element highlighting the barrel object and removing the indicator, however when removing the barrel indicator, an indicator is then placed upon the next object of interest ( a dolphin swimming in distance, with its own dedicated script) etc?
     
  15. MaxKMadiath

    MaxKMadiath

    Joined:
    Dec 10, 2016
    Posts:
    67
    @brinca , Sorry Please let me know which line u added these changes.I am not a core programmer. Thanks
     
  16. brinca

    brinca

    Joined:
    Mar 29, 2015
    Posts:
    33
    @MaxKMadiath Simply find the Start method on HUDNavigationSystem.cs and replace it with my code example.
    Remember to replace the comment with the original content of the Start method, as noted in the example.

    It should work right off the bat, although, I should warn, this was just meant as an example, you may have to edit it (my version is a bit more complex, I simplified it a bit for the sake of legibility).
     
  17. cloverme

    cloverme

    Joined:
    Apr 6, 2018
    Posts:
    192
    Stuck on something... I can't get an indicator to show on the minimap. It's always disabled under the element container. It works okay in the example scene demo... I must be missing a setting somewhere... ? It must have something to do with range, but can't seem to find a setting.

    Update: It has something to do with currentMinimapProfile being null, even though there's a MiniMap profile assigned to config.minimapProfile. I dunno, I just hardcoded it for now until maybe the dev or someone else knows? *shrug*
     
    Last edited: May 13, 2020
    raul3d likes this.
  18. haywirephoenix

    haywirephoenix

    Joined:
    May 17, 2017
    Posts:
    101
    For anyone who has this issue, you may be facing the limitations of Unity engines coordinate system not a problem with the asset. Have you ever noticed that when scaling a value in the editor too high it starts to replace the zero's with something like 2e+17? This is because the floats aren't 64 bit and after a certain value, they revert to integers meaning they jump. If you're working with a large world, you need to roll your own solution to the waypoint if it's over say 50000f.
    See here: https://wiki.unity3d.com/index.php/Floating_Origin.

    If you are not using large scale distances but are experiencing UI position issues, make sure your canvas is set to Screen Space - Overlay.

    @SickscoreGames I can see that you've been online this week, but you haven't replied to your customers on the forums in over a year. As I've displayed above, not every issue is caused by the asset so you don't have to resolve everyones issues, but I would like to see you active on the forum. I was about to buy this asset but your abscence is concerning. Please respond to people otherwise we will have to have the asset taken down to prevent other people getting burned. We've all had too many experiences like this on the Unity Asset Store, please don't let people loose faith, come back! Your asset it awesome.

    Until then, I would like to advise anyone who's arrived here looking to buy that they hold on until we hear from the developer. If we do I will remove this message.
     
    Last edited: Jun 26, 2020
  19. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    1,267
    They are horrible at replying on here or email.
     
    dsilverthorn and haywirephoenix like this.
  20. UnityRocksAlt

    UnityRocksAlt

    Joined:
    Dec 28, 2015
    Posts:
    157
    Thanks, but I didn't understand fully, can you explain step by step. However, adding current-minimap-profile only helped in making icons active. But the moving icon along with player still exists.
     
  21. UnityRocksAlt

    UnityRocksAlt

    Joined:
    Dec 28, 2015
    Posts:
    157
    I dug into the code and fixed it myself, about the Minimap Marker moving along player. There is error in calculation in "KeepInRectBounds(...)" method (Script: HUDNavigationSystem.cs. Commented out Line 655 -657) which was the culprit, I just commented it out. And it doesn't offset anymore.

    I also commented out Line 662-664 (ShowMinimapAboveArrow) and disabled the Height Arrows in prefab.
     
    Slaghton and combatsheep like this.
  22. raul3d

    raul3d

    Joined:
    Mar 30, 2014
    Posts:
    1
    Thank you for posting a solution to this problem. I got stuck with the same bug and you saved me a lot of time. Devs should take note of this and fix it.
     
    cloverme likes this.
  23. DeidreReay

    DeidreReay

    Joined:
    Oct 28, 2019
    Posts:
    49
    Has anyone worked out (or are we missing seeing something) Assigning at runtime for use with multiplayer??? This we will need in order to add to the game minimap and such. Just wondering how to go about such
     
  24. SickscoreGames

    SickscoreGames

    Joined:
    Apr 22, 2018
    Posts:
    33


    TOPIC: Statement and further plans

    Hey guys,

    I really owe you a statement what was going on and why I was so absent the last months:
    It took an enormous amount of time to give support on multiple support channels, so I decided to switch to email support only. Furthermore I'm having major issues with forum notifications, so I have to check the forum multiple times a day to not miss any reply or PM. This is extremely time consuming as you can imagine.
    A while back I contacted Unity to delete this forum thread, so I missed, that this thread is still active, even though it was shut down (at least theoretically, because it was actually never deleted).

    So, why didn't I reply to all emails? Why took it so long for me to reply?
    It's really strange for me to write this publicly, but I want to be honest with you guys.
    I was diagnosed with cancer and had chemotherapy for the past few months.
    I always tried to push myself to not lower development and support, but this was not working at all.
    Now, after I defeated this enemy and collected all HP / XP points, I'm back for more! :cool:

    I really hope that you will understand my situation and my absence.
    Many of you may not know that I'm a solo developer and have a full time job alongside developing assets.
    Enough said, I'd suggest to draw a line here and continue strengthened!
    ----------------------------------------------------------------------------------------

    What's planned? What am I working on?
    • Bugfixes: Please provide me details on all issues you found in the current version!
    • Fullscreen Map: This is by far the most requested feature and will be included in v2.3.0).
    • Locations / Location Reveal: Pretty popular request. Currently planned for v2.4.0.
    • Add-on Support: Create own add-ons for the system! There will be official add-ons such as VR!
    • VR / AR: This will come as an add-on, once the add-on support is fully implemented.
    • Website: News & Announcements, Public Roadmap, Community Add-ons, …
    • ?????: Missing a feature? Write your suggestions below!

    Cheers, Markus // Sickscore

    => I'd love to hear your feedback and suggestions!
     
  25. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    Last edited: Nov 21, 2020
  26. kokakee

    kokakee

    Joined:
    Jun 8, 2015
    Posts:
    9
    Hi .. Hope u are well
    Minimap in Radar would be a nice addition..
     
  27. TheDesignium

    TheDesignium

    Joined:
    Oct 23, 2014
    Posts:
    2
    How can I reset the navigation system to zero without rotating the camera?
    e.g. have my camera at say 90 degrees Y, hit a button and have the system treat that as zero?

    alternatively is there a way to use local rotation rather than global?


    EDIT ++++++++++++++++++++++++++++++++++++

    i figured this out. you just need to edit the HUDNavigationCanvas.cs script so that the update functions use rotationReference.localEulerAngles raher than eulerAngles
     
    Last edited: Dec 10, 2020
  28. haywirephoenix

    haywirephoenix

    Joined:
    May 17, 2017
    Posts:
    101
    Thanks for getting back to us @Sickscore glad you're okay. I hope you've done lots of research into things you can take and adjust to stay well. Patching your body's bugs is the most important!
     
    Last edited: Dec 10, 2020
    Hawk0077 likes this.
  29. cloverme

    cloverme

    Joined:
    Apr 6, 2018
    Posts:
    192
    Cinemachine flickering fix... if you're using a Cinemachine virtual camera, the WorldToScreenPoint unity method stops working correctly. Cinemachine has an annoying transform update process between the cinemachine brain and the unity camera gameobject. To fix it, you have to hook into the Cinemachine class. Add the code from the link/post below into the HUDNavigationSystem class.

    https://forum.unity.com/threads/cinemachine-shake.641497/#post-4298956

    Then, copy the code in the UpdateNavigationElements method and move it to the newly created OnCameraUpdated method. Comment out any code in the UpdateNavigationElements, but leave the actual method so it's just empty. The jitter for the navigation UI elements will now be gone.
     
    Hawk0077 likes this.
  30. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    Thanks, I will try but I am not a coder so most of what you instruct will be guess work. But thanks anyway.
     
  31. jessejarvis

    jessejarvis

    Joined:
    Aug 9, 2013
    Posts:
    303
    Okay this is a little odd but how do I setup an icon for an npc? I'm trying to add HNS Minimap Prefab to a horse and drag an image in the icon slot but it's not working. I have a feeling I'm doing it wrong lol, or missing a step.
     
  32. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,027
    As I recall, they are not icons, but prefabs that have an associated icon that need to be dragged into those slots. You need to take an existing prefab, duplicate it, rename it, and assign the icon to the prefab and then drag that to the slot.
     
  33. jessejarvis

    jessejarvis

    Joined:
    Aug 9, 2013
    Posts:
    303
    Thank you! I believe I remember that process now.

    Edit: Well part of it. Just need to figure out how to connect it now haha. Unless I just dragon teh MinimapPrefab_Default to the horse game object but it's a ui prefab so I doubt that. I'll figure it out though! :D

    Edit 2: Ah okay you need to also use/setup the HUD Navigation Element on the game object you want to track.
     
    Last edited: Jan 14, 2021
    magique likes this.
  34. khushalkhan

    khushalkhan

    Joined:
    Aug 6, 2016
    Posts:
    176
    greatt assets, is there any way to make a line connecting player to target point so that player knows where to go
     
  35. eleon-games

    eleon-games

    Joined:
    Feb 19, 2015
    Posts:
    56
    I changed my players camera in runtime. I tried this script inside the HNSPlayerCamera

    Code (CSharp):
    1. Camera SecondCam;
    2.  
    3. void Start ()
    4.         {
    5.             SecondCam = GameObject.FindGameObjectWithTag("second_Camera").GetComponent<Camera>() as Camera;
    6. }
    7.  
    8. void Update()
    9.         {
    10.             if (Input.GetKeyDown("space"))
    11.             {
    12. HUDNavigationSystem.Instance.ChangePlayerCamera(SecondCam);
    13.             }
    14.         }
    15.            
     
    Last edited: Jun 3, 2021
  36. Egi010

    Egi010

    Joined:
    Dec 13, 2020
    Posts:
    11
    Hello i hope you already well since last year, i planning to buy this asset. But before that is this asset working with the networking solution like Mirror, Phototon or something similar? Thanks.
     
  37. Homicide

    Homicide

    Joined:
    Oct 11, 2012
    Posts:
    657
    If anyone has managed to figure out how to offset a minimap, i would be ever so grateful of a detailed explanation.

    I have additive scenes that the map isnt always around Vector3.zero, but whenever i create minimaps with the texture creator, and then enter the additive zone, im standing way off from what i should be. I tried changing offset, but ony after the defaults were clearly not working, nothing seems to work.

    How do you additively load a scene and when it becomes active, and the minimap is enabled, be in the correct place on the minimap?

    Im lost.