Hi,

In my game, I extensively use Interact type Event Interactions. The player clicks on a game object and it starts an interaction event. However, I don't want these interactions to be triggered on a mouse up, only on a mouse down. In the editor, if I check in Base/Controls - Game Controls -Interaction Settings - Click interaction, I don't see any option to prevent mouse up clicks. Is this option missing or am I just looking at the wrong place?

Thanks!
  • edited January 11
    There's no option for that, interactions start on mouse release/up.

    An alternative setup would be setting up an input key for mouse down, using it as interaction key and enabling the Start Click Interaction setting in Base/Control > Game Controls > Interaction Settings.
    You can also set up an ORK Input Key input origin to use multiple input keys for a single input.
    Post edited by gamingislove on
    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!
  • When I do what you suggest, mouse button down effectively starts an interaction, but the problem is that mouse button up also keep starting interactions. I need a way to prevent mouse button up from triggering interactions.

    Let me explain the context a bit more... When the player clicks and hold the lmb in my game, the character moves. When the player stop moving while the cursor is over an interactable object however, I don't want to start the interaction, I just want to stop the player movement!

    Maybe I could set a global variable to true when the player is moving and then, set it to false on mouse up. Then, I could add a check for all the interactions of my game so that they don't trigger when this variable is set to true. This seems a bit cumbersome though...

    Any better solution to suggest?
  • Hm, I'll look into it.
    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!
  • edited January 12
    Well, I added a condition to all my interactable objects and it works quite well. I just test if a global var IsMoving is false, so it doesn't start the event if the player is moving. In my c# code, I also test to make sure the cursor is not over an interactable object before I set IsMoving to true (using ORK.Game.Interactions.CursorInteractions.Count).

    Knowing that, I just have to add this condition to all my new interactable objects, so it's not tooooo bad ;). The only issue I have is with objects with an Event Interaction component that already tested an Object variable. Since my IsMoving variable is a global variable, ORK doesn't allow the testing of both an object variable and a global variable in Event Interaction...

    I still think it would be more intuitive if we could simply configure what kind of click can trigger an action...

    My game is a kind of crossover between a point and click adventure and an RPG, so maybe I have issues that are not super common in more "classic" RPGs...
    Post edited by ArsMagika on
  • Next update will add a setting to select Down or Up mouse/touch to start click interactions.
    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!
  • Oh! That's great! However, don't you think it could be simpler (for the user ;)) if we could just have an option to disable the click interactions and only use the "Interact key"? Just my humble opinion though...
  • edited January 13
    That's already possible by setting the Max Click Distance to 0. Either the default value in the game controls or per interaction (if you override it there).
    Post edited by gamingislove on
    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!
  • Ok, I didn’t realize that! In this case, the current setup seems perfect to me.
Sign In or Register to comment.