edited June 19 in ORK Support
GiL, I found two things about the interact event interaction that is weird.
The first - I put an interact event interaction on a gameobject. In the event, a choice dialogue just pops up asking me if I want to pick up the game object or not. If the choice dialogue is showing and i disable the game object, the choice dialogue will be gone. So far so good. But if I enable the game object back, I can go up to it again and the event interaction hud will show up, but I can't click on it anymore. Nothing will happen.

The second, this one is very tricky, and so far in all of my aggressive approaches to find out why, I couldn't, but if I am testing the game normally without paying any attention to it, somehow the bug will appear once in a while.
On my door, I have a child object, the doorknob, that I attached an interact event interaction to. The event is simple, check the object game variable of the door to see what state (open or close) the door is in, and play either a close or open door animation on it if I go up and interact(which is the space button) with it.
I have a trigger interaction near the door, and if I enter the trigger, the door will play the close door animation and will disable the doorknob after that.

This is the trigger event -
Legacy Animation(door closes, wait for the animation to end) - > Activate Object(Deactivate the doorknob so the player will not be able to open the door again until I make it so again)

The bug is that sometimes when I am in the trigger and the door closes, if I rush at the door while it is in the midst of closing, sometimes the "Open Door" interaction hud(as define in the custom section) is still showing even if I am not near the doorknob, and I can now click space anywhere in the game to close or open the door repeatedly. Weirdly, the doorknob is supposed to be deactivate because of the trigger event, but when the bug appears, the doorknob is still enabled. To fix this bug in game, I will have to go back to the doorknob and let my interaction controller touch it to make the interaction hud disappear and everything back to normal. This one is very hard to track down because it is happening so randomly. Sometimes doing the same thing will have result in no bug, but then sometimes the bug will appear. Do you know why?

I have recorded a vid of the bug. Notice how the interaction hud is still on even though I am not near the doorknob, and I can open and close the door from anywhere. The hud only disppear and the bug gone when I go back to touch the doorknob.
https://www.dropbox.com/s/hrawczb04ku9srk/Interact bug.mp4?dl=0
Post edited by Shadow_Fire on
  • There are different solutions for this, the easiest would be to enable Blocking Event in the event settings of both events on the door. Only one blocking event can be executed at a time, so the other event wouldn't be available when the 1st is already running.

    The more complex way would be using variables to mark the door currently being moved and use that as variable conditions in the event interactions. The events would need to set those variables when starting and removing them (or changing them) at the end.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Thanks! I did it as you say with the complex method and it is working fine so far.

    Oh yeah, I finally found out why the weird thing is happening. It's because when my interaction controller is on an interact object and the interaction hud pops up, if I disable the interact object via another game event(for example, a key input event), when I move away and enable the interact object again with another game event(for example, a key input event again), I guess ork did not update that the player's interaction controller is no longer touching the interact object, that's why I can still interact with it even though I am far away. Can you confirm if this is a bug or not?
    Because when I am in that weird state, I can no longer interact with any other objects unless I go back and touch the object that I originally disabled. I already solved my problem, so it doesn't matter to me right now, but I just want to make sure that if it's intended, I will avoid disabling interacted objects in the future :)
  • I'll look into it - but that might be the case.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Sweet! Thanks, Gil.
  • If I understand it right this has to do with an event firing and either awaiting for an input or pausing for any other reason. Because once the event starts it no longer matters if you are in or out of the trigger anymore.
    I've had this problem too using "wait for input" event interactions which stops the event regardless of if you are in the trigger anymore or not. So you can pass by one of these triggers and keep walking away and still interact with it.
  • edited June 24
    Ahh I came upon that too once. In the case of that, I can see why it is like that. In Makinom it is pretty easy to solve that, as there is the Collider Intersect Bounds.
    What I did was just make the trigger a trigger stay and added in the collider intersect bounds ->if success, go to input key, with the no input section linked to nothing.
    Ork has no such node, so I had to create 3 trigger events on the same game object - trigger enter, trigger exit, and trigger stay.
    A variable will be changed upon entering the trigger and exiting the trigger and use that in the trigger stay check game variable to act as the collider intersect bounds in makinom.
    Post edited by Shadow_Fire on
  • edited June 25
    Will be fixed in the next update (both ORK and Makinom).

    The issue is that trigger exit isn't called when disabling a game object, i.e. the interaction controller still has the interaction recognized.
    Post edited by gamingislove on
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Ahh I see the problem. Thanks for fixing it!
  • Yeah ... I think it's more of an Unity quirk not calling trigger exit when disabling a game object in a trigger. They call trigger enter when enabling it in a trigger, so this behavior is a bit inconsistant :)
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.