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