SOLVED
I realised that I just want to open/close door with LMB, no need for key E. So I just fixed it by myself.
Hi. First of all, I’m using UE4.25.4.
I have a blueprint that works properly - if I press E, door opens/closes and it plays sound. This all works well. But I want to add one thing. You can press E while standing on the opposite side of map and door is still opening/closing. I want this to be able only if I’m pointing at the door object. What should I do to make this work? Can I use OnBeginCursorOver? Thanks for replies!
Do you mean remotely control the door , but only under the condition when your mouse is pointing at the door?
If so, Yes, you can use on mouse over event.
Try create a new Boolean variable, name it CanOpen, then on mouse over set it to true, on mouse leave set it to false.
right behind your keyboard event, do a if branch to check the Boolean. If true open, if false do nothing.
So when your mouse not on the door, the bool won’t be true, and of course won’t open.