Hey guys,

I'm having a problem when clicking to trigger an interaction. The problem is that I seem to be able to trigger the event on click as long as my interaction controller is in the vicinity of the event trigger - within max click distance. Whether or not the click happens on an object set to the layer mask for interaction clicks.

Because I'm using mouse0 to move and to interact, I am triggering the event even when clicking away to move away from the event.

My issue is similar to the one posted here http://faq.rpg-kit.com/discussion/4571/solved-mouse-interaction-controller-infinte-loop however the solution/workaround posted there did not fix things for me, I think because my game is 2d.

In any case the issue seems to be that clicking anywhere triggers the event, while you are close, the raycast doesn't seem to work as one may expect. Interesting though, if I remove the interact layer from the object, clicking anywhere doesn't trigger the event anymore, so the layer is used somehow, but I'm not sure I understand how.

I would appreciate any help/advice, thanks in advance!
  • edited June 2019
    Can you screenshot the inspector of your event trigger and your setting in Base/Control->GameControls->Interaction Settings?
    Post edited by hellwalker on
  • sure thing:
    g9ITs.png
    g93Dk.png

  • Starting the interaction by clicking on it would require the click to be somewhere above the interaction's colliders to receive it - i.e. if you click anywhere and the interaction starts, the collider seems to be everywhere ...

    Since you'd probably have found that already, I think it's either:

    1) You also use the mouse button as Interact Key (Base/Control > Game Controls > Interaction Settings).

    2) You have an Interaction HUD that has Interact on Click enabled and uses a GUI box across the entire screen.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Yeah, there is no such collider that covers the entire screen. The interaction has a small capsule collider 2d. Also I have to be within the interaction's radius and then click anywhere in order to trigger it. As for the other points:

    1. I've had Enter set for the 'Accept' key, but even if I set the interact key to none, the issue persists.
    2. I only have one HUD set up in Ork at the moment, the one for Main menu and it disappears once the scene is loaded.

    My guess is that there is something up with that raycast maybe. Because it's 2d, I'm using a custom controller and camera, not sure if these could be the cause though. Please let me know if you need more info from me, I'll be sure to provide them. Thanks!
  • What's your Raycast Type in Game > Game Settings?
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • It's 'Only 2D'
  • Hm, could you send me a small Unity test project with your setup to contact@orkframework.com? E.g. upload it somewhere like dropbox and send me the link.

    I'd just need a simple scene with your setup where this happens.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Thanks for further looking into this, I've sent over a snippet of the project via wetransfer to your email address. I hope it's ok.
  • Thanks - I was able to find the issue: it's a bug :D

    Will be fixed in the next update.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Nnice, thanks!
Sign In or Register to comment.