Forum rules - please read before posting.

Hotspots distance?

Hello, 
I need to set a fixed distance from the camera to the hotspot (if the distance is greater than a fixed value, the player can not use the hotspot) is it possible? It is very necessary for the First Person adventures.
Thank you.

Comments

  • edited April 2015
    Yes, look in the Settings Manager.  There'll be a setting called Hotspot ray length towards the bottom.
  • Is it possible to set a hotspot ray length that is relative to the player position instead?

    For example, as a character walks across the screen (left to right), certain hotspot icons (not the interactions icons) will become visible only if the player is close enough.

    So it's possible to see a certain number of hotspots icons if they are within that ray length.

  • You can set the "Hotspot detection method" to "Player Vicinity" to require Hotspots to be within a Trigger collider that you must then attach along with a Detect Hotspots component on the Player's child.

    See the Manual's "Player-vicinity detection" chapter for more on this topic.

    You can also set it to "Custom Script", and rely on a custom script that sets the active Hotspot manually with:

    AC.KickStarter.playerInteraction.SetActiveHotspot (Hotspot hotspot);
    
  • Hello Chris,
    I have already done that, however i think the concept of hotspot detection is a bit confusing at the moment, at least in the context of what i am trying to achieve.

    The "hotspot detector" should only detect the hotspot (and show either the icon or the label, or both), not open the interaction menu, unless the player decides to.

    In my case, i would like to show the hotspot icon of hotspots that are, let's say, within 5 meters from the player, but only open the interaction menu if the hotspot is within 1 meter from the player.

    I was thinking of achieving this (only showing hotspot icons) using raytracing, and using the hotspot detector to open interaction menus.

    Would there be a more appropriate approach?

  • edited July 2020

    Is this for a 2D or a 3D game, and on what platform?

    Can you share screens of your Settings Manager and Interaction menu's properties? It should be possible to still require clicking a Hotspot to open up its Interaction menu.

    If you did want to differentiate Hotspots that are 5m vs 1m, though - yes, some kind of raycasting script would be necessary. Showing Hotspots that are within 5m would just be a visual effect, if you still only wanted Hotspots that are within 1m to be the only ones you could actually interact with.

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.