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(Unreal Engine 4: How to Open and Close a Door. 4.13.2 (Outdated) - YouTube)
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
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.
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.
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.
Add the Interface to the Actor, and create its Event, from which you’ll play a [timeline][3]
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)