Forum rules - please read before posting.

How to Prioritize Mouse over callback over navmesh2d

HI,

I am trying to write something like a hotspot(with a long click to active it)

However the mouseover callback doesnt get call when the object is inside navmesh2d.

i would like it to function exactly like AC hotspot which is when i click the hotspot ,it triggers without player run to it.

Comments

  • Just to make things clear and check if there are smarter way, the thing i actually want to do with hotspot is

    out side the hotspot detection boundary

    on single click

    player move inside the boundary of the hotspot

    inside boundary

    on mouseover and mouse down

    check hotspot trigger condition

    if match

    stop player movement if he still moves

    wait for long click time

    trigger the hotspot

    I already wrote my own hotspot method. but i am not sure how to put it into ac , if it is better.

  • Checking Place distant Hotspots on separate layer? will cause Hotspots outside of the Player's "Hotspot detector" to be moved to the DistantHotspot layer. This should cause clicks on them to be ignored in favour of the NavMesh.

    If you're writing your own Hotspot interaction system, you can rely on Unity's Input system to read the mouse position / click-state, which won't interfere with AC's own mouse clicks.

    See the included CustomInteractionSystemExample.cs script for more on how to trigger Hotspot interactions directly. The ClickByHoveringCursorExample.cs script also demonstrates how Hotspot interactions can be triggered after a given time has elapsed.

  • Thx for pointing out a direction for me, i will go study those script.

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.