Forum rules - please read before posting.

Hotspot Visibility

I want to drag my finger on a mobile screen and  hotspot appears only when the finger is close to him

How to do that?

Comments

  • edited October 2015
    You'll need to look into modifying your Player to detect Hotspots.  This tutorial will help.  Please post such questions in Technical Q&A in the future.
  • That would be fine for the player but if want to look about hotspots in a room just by dragging the finger not moving the player
    Just the feature of Baphomet 5
  • Sorry i did not post in Q&A
  • edited October 2015
    You'd have to use a custom script for that, then.  Do a check for the touch position, and use a raycast to check it it's over a Hotspot:



    RaycastHit2D hit = Physics2D.Raycast (Camera.main.ScreenToWorldPoint (Input.GetTouch (0).position), Vector2.zero, AC.KickStarter.settingsManager.navMeshRaycastLength, 1 << LayerMask.NameToLayer (AC.KickStarter.settingsManager.hotspotLayer));</code>

    if (hit.collider != null && hit.collider.gameObject.GetComponent ())
    {
    Hotspot hitHotspot = hit.collider.gameObject.GetComponent ();
    //
    }


    You can highlight a Hotspot with it's Select() function.
  • Thank's but that is fine
    I'm using in settings:
    Input Method: Touch Screen
    Hotspot detection method : Mouse over

    thats working on mobile by clicking or dragging

    ^:)^
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.