How to use animated_mesh_device
SymbolGeneratedcompiles

How to use animated_mesh_device

Updated GeneratedCode verified

How would I use this?

The animated_mesh_device is your bridge between static props and dynamic, skeletal animations in UEFN. It allows you to attach a skeletal mesh to a device and control its playback state — Play, Pause and Reverse — from Verse.

What it's for

Use this when you need a prop (like a statue, a dancing NPC, or a mechanical part) to perform an animation that isn't baked into the static mesh itself. Unlike creative_prop, which just displays a static image or simple skeletal mesh without control, animated_mesh_device exposes methods to drive the animation timeline programmatically.

When to reach for it

  • Interactive Props: You want a statue to start dancing when a player steps on a trigger.
  • Sequenced Events: You are building a cinematic or a trap that requires a specific animation frame or loop to sync with audio or other devices.
  • State-Driven Animation: You need to pause an animation mid-way or reverse it (e.g. a drawbridge that lowers, then raises again).

Typical Call Pattern

  1. Declare the Device: Add an @editable field of type animated_mesh_device to your creative_device class.
  2. Wire in Editor: Place the device on your island, assign the desired Skeletal Mesh and Animation in the device's details panel, and wire this Verse device to it in the User Options.
  3. Control Playback:
    • Call Play() to start or resume the animation.
    • Call Pause() to freeze the animation on the current frame.
    • Call PlayReverse() to play backwards.

Faithful Verse Snippet

Here is a concrete example of a device that starts an animation and flips its direction each time a trigger fires.

using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }

dance_device := class(creative_device):

    # Reference to the Animated Mesh Device placed on the island.
    @editable
    AnimatedMesh : animated_mesh_device = animated_mesh_device{}

    # Reference to the Trigger Device placed on the island.
    @editable
    DanceTrigger : trigger_device = trigger_device{}

    # animated_mesh_device drives DIRECTION and PLAY STATE, not speed:
    # its whole Verse surface is Play(), Pause() and PlayReverse().
    var Forwards : logic = true

    OnBegin<override>()<suspends> : void =
        DanceTrigger.TriggeredEvent.Subscribe(OnTriggered)
        AnimatedMesh.Play()

    # Each trigger flips the animation's direction.
    OnTriggered(Agent : ?agent) : void =
        if (Forwards?):
            AnimatedMesh.PlayReverse()
            set Forwards = false
        else:
            AnimatedMesh.Play()
            set Forwards = true

On playback speed: animated_mesh_device exposes exactly three playback members in Verse — Play(), Pause() and PlayReverse(). There is no play-rate setter on this device; animation speed is a property of the animation asset itself, set in the editor.

Turn this into a guided course

Add animated_mesh_device 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.

Original symbol 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.

Comments

    Sign in to vote, comment, or suggest an edit.Sign in