Forum rules - please read before posting.

Radar detector

Hi i was looking Puzzle Agent 2, and has something that i really like for reveal objects. If you click anywhere on the screen an small radar detect the objects near you click. So that how you know if there something near and prevent the pixel hunting.
Is there any way to do something like that?
thanks

Puzzle Agent 2 Video
https://www.youtube.com/watch?v=w_cOwNiV4P4

Comments

  • Hotspots on-screen can all be flashed at once by triggering the "FlashHotspots" input.

    For something more unique, e.g. flashing all Hotspots outwardly from a given point on-screen, a custom script can be written that invokes the Flash() function in the Hotpot's Highlight component:

    myHotspot.highlight.Flash ();
  • Ok. Can you give me an example? I´m not to good with this kind of custom script.
    Thanks!
  • You can refer to Unity's official forums for help with general scripting, but the included "WorldSpaceCursorExample" script demonstrates how the mouse position can be converted into a position in 3D space. 
  • Ok maybe i could make something like a big hotspot the if you click on then you can select some hotspots to show some icon or texture. A custom script but with some parameters like how many hotspots you want to show, and the hotspots.
    I know it´s something more for the unitys  official forums but any other suggestion or help before posting something in the forum and wait alot of time :)
    thanks again
  • edited December 2016
    ummm... can't you just make a sphere/circle collider for your hotspot detector and then animate that? I'm not sure if that option is available in 2D, but in the settings manager there should be an option for hotspot detection: Player Vicinity, Nearest Only. then you could have the detector size super tiny or placed outside of the screen, and then when there's a click or button press you could position the hotspot detector over the player/cursor's location and change it's size using animation. Once done you could have the hotspot detector move out of the way again.
  • I still have problems to work this custom function :( Thanks anyway
  • I fund this to perform the detection of objects. Now how can i implement for use in adventure creator.
    I have to change the normal function of the mouse?
    Any help i stuck with this.
    Thanks

    http://answers.unity3d.com/questions/532746/finding-gameobjects-within-a-radius.html?_ga=1.216846292.356496927.1484833232
    https://docs.unity3d.com/ScriptReference/Physics.OverlapSphere.html


  • Try this:

    http://paste.ofcode.org/Ymiw8nBDaaPpuPESAwTpZY

    Paste in a file named "Radar.cs", attach to a cube without a collider in your scene (so you can test its position) and assign the fields in the Inspector.  Define an input named "CustomFlashHotspots" - when pressed, the CheckForHotspots function will run.

    Please be mindful that this is not a forum for general coding advice.  Help regarding the use of AC's variables and function can be given, but please try to ask on the general Unity forums in future about general scripting.
  • Thanks Chris! I know it´s not for coding advice this forum, i was a little bit lost and was digging with this a few days without good results. I post it on unity and the gave me some tips but doesn´t help. Sorry again, i think this function it will be useful for other people to.
    Again thank you!

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.