Make Your Props Dance: The Animated Mesh Device
Unverified — this example may not compile as-is.
The Verse code below did not pass our automated compile check, so it isn't marked verified and is hidden from the guide listing. The explanation may still be useful, but treat the code as a draft and adapt it before use.
Make Your Props Dance: The Animated Mesh Device
Do you want your island to feel alive? Static objects are fine. But moving, dancing, or waving props are way cooler. You can make a statue dance. You can make a flag wave in the wind. You can make a robot wave hello.
In this tutorial, we will use the Animated Mesh Device. It is a special tool in UEFN. It lets you play animations on 3D objects. We will build a simple dancing statue. Players will click a button to make it move. Let's get started!
What You'll Learn
- What a Skeletal Mesh is.
- How to use the Animated Mesh Device.
- How to connect a Trigger to an animation.
- How to make your island interactive.
How It Works
Imagine a puppet. A puppet has strings. You pull the strings to make it move. In Fortnite islands, we use code and devices instead of strings.
The Animated Mesh Device is like the puppeteer. It holds the puppet (the object) and the moves (the animation).
First, we need the right kind of object. Most objects in Fortnite are Static Meshes. They do not move. They are like rocks or walls. But some objects have bones inside. These are called Skeletal Meshes. They can bend and twist. Think of a robot toy. It has joints. It can move its arms. That is a skeletal mesh.
Next, we need the moves. These are called Animations. An animation is just a list of positions. It tells the robot where to put its arm at each second.
Finally, we need a way to start the move. We use a Trigger. A trigger is like a doorbell. When someone presses it, something happens. We will connect the doorbell to the puppeteer.
Let's Build It
We will build a dancing statue. Here is how to do it step-by-step.
Step 1: Get Your Props
You need two things from the Content Browser:
- A Skeletal Mesh (a prop that can animate). Look for items like robots, animals, or characters.
- An Animation file. This usually comes with the mesh or is imported separately.
Step 2: Place the Device
Go to the Devices tab in Fortnite. Search for Animated Mesh. Drag it into your island.
Step 3: Connect the Mesh
Click on the device. Look at the User Options panel on the right.
- Find the Skeletal Mesh slot. Drag your prop here.
- Find the Animation slot. Drag your animation file here.
Now the device knows what object to move and how to move it.
Step 3: Add a Trigger
We need a button to start the dance.
- Go to Devices again.
- Search for Trigger.
- Drag a Trigger device next to your Animated Mesh.
Step 4: Bind the Trigger
This is the magic part. We connect the trigger to the animation.
- Select the Animated Mesh device.
- Scroll down to User Options - Functions.
- Look for a slot called On Triggered or similar.
- You will see a small plus sign
+. Click it. - Select Trigger from the list.
- Select the Trigger device you placed.
Now, when someone hits the trigger, the animation plays.
Step 5: Test It
Press Play in the editor. Walk up to the Trigger. Hit it. Your statue should now dance!
Here is a simple Verse script to make this even cooler. This script lets you change the speed of the dance.
# This is a simple Verse script for the Animated Mesh Device
# It makes the animation play faster when triggered
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
# We define our main device
DanceDevice := class(creative_device):
# This is a reference to the Animated Mesh Device placed on the island.
# Wire it up in the User Options panel in the editor.
@editable
AnimatedMesh : animated_mesh_device = animated_mesh_device{}
# This is a reference to the Trigger Device placed on the island.
# Wire it up in the User Options panel in the editor.
@editable
DanceTrigger : trigger_device = trigger_device{}
# This is a variable. It changes the speed.
# Think of it like a volume knob for speed.
var speed_variable : float = 1.0
# This function runs when the game starts
OnBegin<override>()<suspends> : void =
# Subscribe to the trigger so OnTriggered runs when a player hits it.
# This is like telling the doorbell to ring our function.
DanceTrigger.TriggeredEvent.Subscribe(OnTriggered)
# We set the animation to start at normal speed
# This is like pressing "Play" on a music player
AnimatedMesh.Play()
# This function runs when the Trigger is hit
OnTriggered(Agent : ?agent) : void =
# We change the speed variable
# This makes the dance faster or slower
set speed_variable = 2.0
# We tell the device to use the new speed
# PlayRate accepts a float multiplier: 1.0 = normal, 2.0 = double speed
AnimatedMesh.SetPlayRate(speed_variable)
# We print a message to the output log
# This is like leaving a note for the player
Print("The dance is now fast!")
What does this code do?
@editablemarks a field so you can wire up a device in the editor's User Options panel.AnimatedMeshholds a reference to the Animated Mesh Device you placed on the island.DanceTriggerholds a reference to the Trigger Device you placed on the island.speed_variableis a container. It holds a number. Thevarkeyword means we can change it later.OnBeginruns once when you start playing. It subscribes to the trigger and starts the animation.DanceTrigger.TriggeredEvent.Subscribe(OnTriggered)tells the trigger to call our function when a player hits it.OnTriggeredruns every time someone hits the trigger.Printshows text in the output log. It helps you debug.
Try It Yourself
Now it is your turn to create.
Challenge: Make a waving flag.
- Find a flag or a character that can wave.
- Place an Animated Mesh Device.
- Connect a Trigger to it.
- Hint: Try adding a second Trigger. Make one Trigger start the wave. Make another Trigger stop the wave. Look for a function called Stop Animation in the device options.
Did it work? Great job! You just made your first animated object.
Recap
You learned how to bring static objects to life. You used the Animated Mesh Device. You connected a Skeletal Mesh to an Animation. You used a Trigger to start the action. Your island is now more interactive and fun. Keep experimenting!
References
- https://dev.epicgames.com/documentation/en-us/fortnite/using-animated-mesh-device-in-unreal-editor-for-fortnite
- https://dev.epicgames.com/documentation/en-us/fortnite/import-and-play-mesh-animations-in-unreal-editor-for-fortnite
- https://dev.epicgames.com/documentation/en-us/uefn/animated-mesh-device-in-unreal-editor-for-fortnite
- https://dev.epicgames.com/documentation/en-us/uefn/import-and-play-mesh-animations-in-unreal-editor-for-fortnite
- https://dev.epicgames.com/documentation/en-us/fortnite/animation-and-cinematics-in-unreal-editor-for-fortnite
Verse source files
- 01-device.verse · device
Turn this into a guided course
Add using-animated-mesh-device-in-unreal-editor-for-fortnite to your free study plan — we'll suggest related pages and stitch the lot into one compile-checked, self-guided lesson with worked examples and quizzes.
References
Original tutorial generated by Verse Island from the Verse/UEFN knowledge base, with references to the Epic Games sources above. Code is validated against the knowledge base.