Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

how to open a door by pressing E?

So this isn't just a simple how to make doors open and all i see on youtube are people doing outdated stuff or working stuff but for one door and have to repeat everything for another which wont help me foe example that person (https://www.youtube.com/watch?v=tm5QZiqVdwI&t=1s0)

And the second kind is what im trying to do but its outdated as when i press E the door just drops its bottom half down into the floor second one(https://www.youtube.com/watch?v=IlhaO7M4tOo) Im trying to do the second on as i can just place the blueprint anywhere i want so if you can help fix the issue i would really appreciate. Thank you

Product Version: UE 4.21
more ▼

asked Jan 11 '19 at 05:10 PM in Using UE4

avatar image

18 1 3 7

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Create an interface with an Interact function.

Create a door actor with a static mesh that has the hinge on the right place. the root component should be a box collision, Implement the interface on the actor.

Trace in front on E, call the interface on the HitActor if you find any.

When the interface triggers on the actor, play a timeline that changes the relative rotation of the door.


more ▼

answered Jan 11 '19 at 05:38 PM

avatar image

1.7k 8 4 8

avatar image bradhrad Jan 11 '19 at 05:41 PM

i apologize for my stupidity if this is easy but can you simplify it to steps because i didn't get the second and third line and maybe the fourth lol

avatar image Evigmae Jan 11 '19 at 06:38 PM

1) Create a Blueprint Interface

2) Create a Blueprint Actor, add a Collision Box and set it as Root. add a mesh component for you Door, Move the mesh so the it rotates where you want it toas it rotates relative to the center of the actor.

alt text

The collision box is what you trace against, so if the door has rotated out of your way, you can still trace to the actor.

3) Add the Interface to the Actor, and create its Event, from which you'll play a timeline

alt text

4) on your character actor do a Line Trace on Input E.

alt text

and call the interface out of the HitActor (please ignore the red scratched bit)

alt text

and thats it, if the actor has the interface implemented, it'll execute the event and the door will open.

You can use a FlipFlop out of the event to call Play/Reverse from the timeline.

Please be a good kid and read the documentation links I posted, Using the engine is all about knowing your basics.

0.png (5.1 kB)
2.png (94.7 kB)
3.png (74.4 kB)
1.png (82.9 kB)
avatar image bradhrad Jan 13 '19 at 06:45 AM

i instead this this which allows the player to be pushed by the door in case of it colliding with the player but it doesn't to work im not sure if its outdated or not but i go to the door and it just does nothing (the push part is in another comment but i think it doesn't have anything to do with the door opening)

alt text

door-opening.png (287.3 kB)
timeline.png (178.1 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question