How to open door by pressing E while looking at it and near it? RESOLVED

I set up a collision boundary around my door so when I enter the boundary, pressing E would open and close the door. But I don’t need to look at the door to do this. I want pressing E to open or close the door to only work when the cursor is on the door. How do I do this?


I know this is an old question and you have probably found an answer to this a log time ago. I do appologize if this is the case!

From your question I think you need a Raycast (or trace). You should read this. is you haven’t already:

The Raycast can be used to determine what actor you are facing (for example a door).

Thanks for the link!

How do I check out my question?

I think you should mark it as resolved (if this is the case).

You’re welcome!

How do I do this?

Under the up/down arrows next to the answer you want to mark as resolved.

Make sure you understand the basics of Blueprint Communications. Here is a great tutorial that not only teaches you what you are asking for, but it also expand on it.

Hey, could you figure out your problem with the tutorial I sent to you? You can ask if something still went wrong, but if you do not have any more questions, make sure to check out your question for tracking reasons! <3