UE5 Door Animation Blueprint
Interactive doors are one of the simplest gameplay systems you can build in Unreal Engine, but they teach several important Blueprint concepts at the same time. In this tutorial, you will create a basic door Blueprint that opens and closes automatically when the player enters or leaves a collision area.
This guide uses Unreal Engine 5.5, but the same workflow works in most Unreal Engine 5 versions. We will use an Actor Blueprint, Static Mesh components, a Box Collision trigger, Timeline animation, and Set Relative Rotation to create a smooth door movement.
Watch the full video tutorial: Unreal Engine 5 Simple Door Animation Tutorial
What You Will Build
By the end of this tutorial, you will have a reusable door Blueprint that can be placed anywhere in your level. When the player walks into the trigger area, the door opens. When the player leaves the trigger area, the door closes.
The final system includes:
- A reusable
BP_DoorActor Blueprint - A door mesh and frame mesh
- A Box Collision component used as the interaction trigger
- A Timeline that animates the door from closed to open
- A second Timeline or reverse logic for closing the door
- Blueprint overlap events that detect the player
- Smooth rotation using
Set Relative Rotation
This is a beginner level system, but the logic behind it is used in real projects all the time. Once you understand this version, you can expand it into locked doors, keycard doors, sliding doors, elevator doors, puzzle doors, or multiplayer interaction systems.
Why Use a Blueprint Actor for the Door?
A door is not just a mesh. It has visual parts, collision, animation, and logic. That means it should be built as a Blueprint Actor instead of being assembled manually in the level every time.
Using an Actor Blueprint gives you several advantages:
- You can reuse the same door in multiple levels.
- You can keep the frame, door mesh, collision, and animation logic in one place.
- You can update the Blueprint once and all placed doors can benefit from the same logic.
- You can later add variables for open angle, speed, locked state, sound, or required key.
This is the correct direction. Do not build every door manually in the level if you plan to use more than one. That becomes messy fast.
Step One: Create the Door Blueprint
Start by creating a new Actor Blueprint for the door system.
- Open the Content Drawer.
- Right click in your desired folder.
- Select Blueprint Class.
- Choose Actor as the parent class.
- Name the Blueprint
BP_Door. - Open the Blueprint.
An Actor is the correct parent class because the door is an object that exists in the world. It does not need Character movement, Pawn possession, or AI behavior. It only needs components and interaction logic.
Step Two: Add the Door Components
Inside BP_Door, we need three main components:
- A door mesh
- A frame mesh
- A collision box for player detection
In the Components panel, add the following:
- Add a Static Mesh component and name it
Frame. - Add another Static Mesh component and name it
Door. - Add a Box Collision component and name it
InteractionBox.
For the meshes, you can use Starter Content assets if they are available in your project. For example, use a door frame mesh for the frame and a door mesh for the moving part.
The frame should stay still. The door mesh is the part that rotates. This separation is important. If you rotate the entire Actor, the frame rotates too, which is not what we want.
Step Three: Position the Door Mesh Correctly
The most important part of a rotating door is the pivot. A real door rotates around its hinge side, not around its center. If your mesh pivot is already placed correctly at the hinge, the door will rotate naturally. If the pivot is centered, the door will swing incorrectly unless you compensate with component placement.
In this setup, adjust the door mesh location so it fits inside the frame. In the original tutorial, the door mesh was moved slightly on the X axis, around:
X = 45
Your exact value may differ depending on the mesh you use. The goal is simple: visually align the door with the frame in the Blueprint viewport.
Be careful here. If the door rotates strangely later, the problem is usually one of these:
- The mesh pivot is not where you expect.
- The door component is not positioned correctly relative to the Actor root.
- You are rotating the wrong component.
- You are using world rotation when relative rotation would be better.
Step Four: Configure the Interaction Box
The Box Collision component is used to detect when the player is close enough to trigger the door. This is not the same as the physical collision of the door itself. It is only an interaction zone.
Select the InteractionBox component and configure its size. A good starting value is:
Box Extent X = 100
Box Extent Y = 50
Box Extent Z = 100
Then move the box upward so it covers the player’s body height. A useful starting offset is:
Location Z = 100
You want the box to cover the area in front of the door where the player will walk. If the box is too small, the door may not open reliably. If it is too large, the door may open too early.
For a beginner version, overlap based interaction is fine. For a production door system, you may later replace or combine it with a line trace interaction so the player must look at the door and press a key.
Step Five: Add Overlap Events
Now we need the door to react when the player enters or leaves the collision box.
Select InteractionBox in the Components panel. In the Details panel, scroll to the Events section and add:
- On Component Begin Overlap
- On Component End Overlap
These two events are the triggers for opening and closing the door.
The logic is:
- When the player begins overlap, open the door.
- When the player ends overlap, close the door.
To make sure only the player opens the door, use the Other Actor pin and cast it to your player character Blueprint, usually BP_ThirdPersonCharacter in the Third Person Template.
This prevents random physics objects, AI, or other actors from opening the door unless you intentionally allow that behavior.
Step Six: Create the Open Door Timeline
A Timeline is one of the cleanest ways to animate simple Blueprint values over time. Instead of instantly setting the door rotation to ninety degrees, we use a Timeline to smoothly interpolate from closed to open.
In the Event Graph:
- Right click and add a Timeline.
- Name it
Timeline_OpenDoor. - Double click the Timeline to open it.
- Add a Float Track.
- Name the track
Rotation. - Set the Timeline length to
1.0second.
Add two keyframes:
Time: 0.0 Value: 0
Time: 1.0 Value: 90
This means over one second, the door rotation value will move from zero degrees to ninety degrees.
A ninety degree opening angle is a good default for most doors, but you can adjust this later. Some doors may only need seventy degrees. Others may need one hundred ten degrees depending on the level design.
Step Seven: Apply Timeline Rotation to the Door
After creating the Timeline, return to the Event Graph. Drag the Door Static Mesh component into the graph and use Set Relative Rotation.
The Timeline’s Update execution pin should connect to Set Relative Rotation. The float output from the Timeline should be used to control one axis of the rotation.
In many simple door setups, the door rotates around the Z axis, so the Timeline value goes into the Yaw value of a rotator.
Conceptually:
Timeline Rotation Value → Make Rotator Yaw → Set Relative Rotation on Door
Use Set Relative Rotation, not Set Actor Rotation. The frame should remain still. Only the door component should rotate.
Step Eight: Create the Close Door Timeline
For a simple beginner setup, you can create a second Timeline for closing the door.
Add another Timeline and name it:
Timeline_CloseDoor
Open it and add a Float Track named Rotation. Use the reverse values:
Time: 0.0 Value: 90
Time: 1.0 Value: 0
This smoothly rotates the door from open back to closed.
Connect this Timeline to another Set Relative Rotation node for the Door component, again using the Timeline float value as the rotation amount.
This works fine for a beginner tutorial. However, if you want cleaner production logic, one Timeline can usually do both jobs by using Play to open and Reverse to close. That avoids duplicate Timeline setup. But for learning, two Timelines are easier to understand.
Step Nine: Connect Overlap Events to Timelines
Now connect the collision events to the animation logic.
For On Component Begin Overlap:
- Use
Other Actor. - Cast to
BP_ThirdPersonCharacter. - If the cast succeeds, play
Timeline_OpenDoor.
For On Component End Overlap:
- Use
Other Actor. - Cast to
BP_ThirdPersonCharacter. - If the cast succeeds, play
Timeline_CloseDoor.
The result is a door that reacts automatically when the player enters or leaves the trigger zone.
Recommended Cleaner Version: One Timeline Instead of Two
The two Timeline approach is easy for beginners, but there is a cleaner version that I recommend once you understand the basics.
Use one Timeline named:
TL_DoorRotation
Add a float track from zero to ninety:
Time: 0.0 Value: 0
Time: 1.0 Value: 90
Then:
- On Begin Overlap, call Play.
- On End Overlap, call Reverse.
This is better because the open and close animation are guaranteed to use the same curve, duration, and rotation logic. If the player quickly enters and leaves the trigger, the Timeline can reverse smoothly instead of fighting between two separate Timelines.
For real projects, this is the version I would use.
Important Blueprint Logic Notes
There are a few details that matter if you want the door to behave properly.
Use Relative Rotation
Rotate the door mesh relative to the Blueprint, not the entire Actor. If you rotate the Actor, the frame and collision may rotate too, which breaks the setup.
Make Sure the Collision Generates Overlap Events
Select the Box Collision and confirm that Generate Overlap Events is enabled. If this is off, Begin Overlap and End Overlap will not fire.
Check Collision Presets
The InteractionBox should overlap the player. If the collision preset blocks instead of overlaps, the player may be physically stopped or the event may not behave as expected.
Cast Only When Needed
Casting to the player character is acceptable in a beginner door tutorial. For larger projects, an interface based interaction system is cleaner because it avoids hard dependencies on one player class.
Step Ten: Place and Test the Door
After the Blueprint is complete:
- Compile and save
BP_Door. - Drag it into your level.
- Position it where you want the door to appear.
- Press Play.
- Walk into the collision area.
- The door should open smoothly.
- Walk away from the collision area.
- The door should close smoothly.
If the door opens in the wrong direction, change the Timeline value from 90 to -90, or adjust the rotation axis depending on your mesh orientation.
Common Problems and Fixes
The Door Does Not Open
Check that the Box Collision overlaps the player and that Generate Overlap Events is enabled. Also confirm your overlap event is connected to the correct Timeline execution pin.
The Door Rotates Around the Center
This is a pivot issue. The door mesh pivot may be centered. Use a mesh with a hinge side pivot, adjust the mesh offset inside the Blueprint, or create a separate pivot Scene Component and attach the door mesh to it.
The Frame Rotates Too
You are probably rotating the Actor instead of only the Door mesh component. Use Set Relative Rotation on the Door component.
The Door Opens Too Fast
Increase the Timeline length from one second to one point five or two seconds.
The Door Opens in the Wrong Direction
Change the open rotation from 90 to -90, or move the hinge side depending on your mesh orientation.
The Door Keeps Triggering From Other Actors
Cast the overlapping actor to your player character, or use an interface to check whether the overlapping actor is allowed to open the door.
How to Improve This Door System
This tutorial builds the basic version. It is good for learning, but you can expand it in several useful ways.
Add an Open Angle Variable
Instead of hardcoding ninety degrees, create a float variable called OpenAngle. Set the default to 90 and expose it to the editor. This lets each door open at a different angle.
Add a Door Speed Variable
Create a float variable for animation duration or Timeline play rate. This lets you make heavy doors open slowly and light doors open quickly.
Add Sound Effects
Use Play Sound at Location when the Timeline starts. Add one sound for opening and another for closing.
Add Locked Door Logic
Create a Boolean variable called IsLocked. If true, do not open the door. You can also play a locked sound or show UI text such as “Requires Key.”
Add Manual Interaction
Instead of opening on overlap, require the player to press E. This is better for gameplay because the player controls when the door opens.
Use Blueprint Interfaces
For scalable interaction systems, create an interface such as BPI_Interactable. The door implements the interface, and the player calls an Interact function. This avoids casting to specific classes and keeps the system modular.
Beginner Version vs Production Version
Here is the honest breakdown.
The beginner version from this tutorial is great for learning:
- Overlap opens the door.
- End overlap closes the door.
- Timeline controls rotation.
- Door mesh rotates with Set Relative Rotation.
A production version should usually be more controlled:
- Use one Timeline with Play and Reverse.
- Use an interaction input instead of automatic overlap.
- Use an interface instead of direct casting.
- Expose open angle and speed as editable variables.
- Add sound, locked state, UI prompts, and optional save state.
The tutorial version does not suck. It is exactly what beginners should build first. But do not stop there if you are building a serious game.
Example Blueprint Flow
Here is the simplified Blueprint logic in text form:
InteractionBox Begin Overlap
→ Cast Other Actor to BP_ThirdPersonCharacter
→ If valid
→ Play Door Timeline
Door Timeline Update
→ Make Rotator
→ Yaw = Timeline Float Value
→ Set Relative Rotation on Door Mesh
InteractionBox End Overlap
→ Cast Other Actor to BP_ThirdPersonCharacter
→ If valid
→ Reverse Door Timeline or Play Close Timeline
This is the core pattern. Once you understand this flow, you can animate almost any simple object in Unreal: doors, gates, drawers, trapdoors, rotating platforms, levers, or moving panels.
Where This System Is Useful
This basic door animation technique can be reused in many types of Unreal Engine projects:
- First person games
- Third person exploration games
- Horror games
- Architectural walkthroughs
- Industrial simulation projects
- Training environments
- Escape room prototypes
- Interactive level design tests
For simulation and archviz projects, automatic doors may be acceptable. For games, you usually want more control with a player input prompt.
Chapters
- 0:00 Introduction
- 0:10 Setting up the Blueprint
- 1:46 Adding interaction functionality
- 3:22 Finalizing the animation
Conclusion
You now have a working interactive door system in Unreal Engine 5.5. The setup uses an Actor Blueprint, Static Mesh components, Box Collision overlap events, Timeline animation, and Set Relative Rotation to create smooth open and close behavior.
This is a small tutorial, but it teaches important Unreal concepts: component based design, collision driven interaction, Timeline animation, and reusable Blueprint architecture. These same ideas appear in much larger systems.
If you want to take this further, the next logical upgrades are adding sound effects, locked door logic, interaction prompts, key requirements, and an interface based interaction system.
Watch the full tutorial: Unreal Engine 5 Simple Door Animation Tutorial
More Unreal Engine tutorials: rambod.net
Frequently Asked Questions
Can I use this door system in Unreal Engine 5.6 or 5.7?
Yes. This Blueprint workflow is simple and should work in Unreal Engine 5.5, 5.6, 5.7, and most Unreal Engine 5 versions.
Why does my door rotate around the middle?
Your door mesh pivot is probably in the center. A real door needs the pivot near the hinge. Use a mesh with a correct pivot, offset the mesh inside the Blueprint, or attach the mesh to a pivot Scene Component.
Should I use one Timeline or two Timelines?
For beginners, two Timelines are easy to understand. For cleaner production logic, use one Timeline and call Play to open and Reverse to close.
Can I make the door open only when pressing E?
Yes. Use the Box Collision only to detect whether the player is near the door, then trigger the Timeline from an interaction input such as E.
Can this work with sliding doors?
Yes. Instead of animating rotation, animate location using Set Relative Location. A Timeline can drive sliding movement just as easily as rotation.
Can I add sound to the door?
Yes. Use Play Sound at Location when the open or close animation starts. You can also add creaking, locking, or impact sounds.
Is overlap based door opening good for games?
It works, but for many games it feels too automatic. A better gameplay version usually uses an interaction key, UI prompt, and interface based logic.
Related Tutorials
More lessons connected by category, tags, engine version, or implementation type.
Recommended resource
Recommended for this tutorial
Useful tools selected for this workflow topic.