The Swimming Relic: Animate-to-Targets Component

In this lesson you'll learn to

  • ✓Student can build a reusable component that eases an entity through keyframed target transforms over time (the scene-graph animation pattern above MoveTo/prop_mover).

Student can build a reusable component that eases an entity through keyframed target transforms over time (the scene-graph animation pattern above MoveTo/prop_mover).

📖 Reference & full walkthrough: The Swimming Relic: Animate-to-Targets Component

🔁 Builds on: animation arc: south/north MoveTo/TeleportTo + prop_mover lessons; west-coves async (Sleep/loop timing)

🧩 Your capstone piece: Banked relics SWIM along a spline of targets to their Athenaeum pedestal


The "Bus Driver" Component: Moving Props Like They’re on the Battle Bus

So, you’ve built a cool island. You have loot, you have traps, you have a map that looks like it cost more than your car. But it’s... static. The crates just sit there. The elevators don’t move. The enemy base is just a brick wall because you couldn’t figure out how to make the door slide open.

In the old days (using Blueprints), moving things around felt like trying to code a ride at Disney World while blindfolded. But now we have Verse and the Scene Graph. Specifically, we’re going to look at how to make objects move between points using Keyframed Movement.

Think of this like the Battle Bus. The bus doesn’t just teleport from the sky to the ground. It flies along a path, slows down, speeds up, and lands. We’re going to build a component that lets you tell an object: "Go here, then go there, and make it look smooth while you’re at it."

What You'll Learn

  • The Scene Graph: Why your objects are "Entities" with "Components" (and why that’s better than just dragging props around).
  • Keyframed Movement: How to define a path and speed without writing complex math.
  • Easing: How to make movement look natural (snappy vs. floaty) instead of robotic.
  • Verse Components: How to write code once and drop it onto any object in your island.

How It Works

Before we touch any code, we need to understand the new way Fortnite thinks about objects.

The Scene Graph: The New Hierarchy

Imagine your island is a family tree.

  • The Entity is the person (e.g., "The Crate").
  • The Component is what they do or have (e.g., "Health," "Inventory," or in our case, "Movement").

In the old days, you’d just attach a "Move" script directly to the prop. In the new Scene Graph, you attach a Component to an Entity. This is like giving your character a "Jetpack" item. The jetpack doesn’t become the character; it’s something the character uses.

Keyframed Movement: The Playlist

You know how a song has beats? Keyframed movement is like a playlist for your object.

  1. Keyframe 1: Move this far from where you are now.
  2. Keyframe 2: Then move this far from there. (Keyframes are relative deltas, not absolute map coordinates.)
  3. Duration: How long it takes to get there (e.g., 2 seconds).
  4. Easing: How it gets there. Does it start slow and speed up? (Like a car launching). Or does it start fast and brake hard? (Like a plane landing).

We use a built-in Verse component called keyframed_movement_component to handle this — and we’ll write our own custom component that drives it (that’s the animate_to_targets pattern). It takes care of the heavy lifting so you don’t have to calculate vectors like a math nerd.

Easing: The "Feel"

If you move an object from Point A to Point B at a constant speed, it looks like a robot. It’s boring.

  • Linear: Robot walk. Boring.
  • Ease-In: Starts slow, speeds up. Good for things launching.
  • Ease-Out: Starts fast, slows down. Good for things landing or doors closing.

This is controlled by "Cubic Bezier" curves, but don’t panic. We’ll use presets that are easier to understand.

Let's Build It

We are going to build a "Revenge Crate." When a player steps on a trigger, a crate slides across the floor, hits them (or misses them, depending on your cruelty level), and stops.

Step 1: Create the Component

In UEFN (Unreal Editor for Fortnite), right-click in your content browser, go to New > Verse File. Name it slide_crates_component.verse.

Step 2: The Code

Copy this code. I’ve added comments that translate "Programmer Speak" into "Fortnite Speak."

using { /Verse.org/SceneGraph }
using { /Verse.org/SceneGraph/KeyframedMovement }
using { /Verse.org/Simulation }
using { /Verse.org/SpatialMath }

# This is our "Recipe" for the sliding crate.
# Drop it on an entity that ALSO has a keyframed_movement_component --
# that built-in component is the "motor"; ours is the bus driver
# telling the motor where to go.
slide_crates_component<public> := class<final_super>(component):

    # SLIDE DISTANCE: how far the crate slides forward, in centimeters.
    # Think of this as setting a waypoint on your map.
    @editable
    var SlideDistance<public>:float = 300.0

    # SLIDE SECONDS: how long the slide takes.
    # Shorter time over the same distance = faster crate.
    @editable
    var SlideSeconds<public>:float = 2.0

    # OnSimulate is the component's <suspends> lifecycle slot.
    # It starts running when the entity enters the live scene,
    # and it's allowed to wait on things (like animations finishing).
    OnSimulate<override>()<suspends>:void =
        # Find the "motor" on this same entity. The [] means this can
        # FAIL (maybe you forgot to add the motor), so we wrap it in if.
        if (Mover := Entity.GetComponent[keyframed_movement_component]):
            # One keyframe = one leg of the trip. Keyframes are RELATIVE
            # deltas: "from wherever you are, move SlideDistance forward."
            Slide := keyframed_movement_delta:
                Duration := SlideSeconds
                # Ease-out: starts fast and slows down at the end.
                # Like a car pulling into a parking spot.
                Easing := ease_out_cubic_bezier_easing_function{}
                Transform := transform:
                    Translation := vector3:
                        Forward := SlideDistance
                        Left := 0.0
                        Up := 0.0

            # Load the playlist: our one keyframe, played exactly once.
            Mover.SetKeyframes(array{Slide}, oneshot_keyframed_movement_playback_mode{})

            # Start the animation!
            Mover.Play()

            # Wait for the trip to end, then announce it.
            # Think of this as the "Announcer" speaking.
            Mover.FinishedEvent.Await()
            Print("Crate has arrived at destination!")

Walkthrough: What Just Happened?

  1. using statements: These are like loading the right DLC. We need SceneGraph to talk to entities and components, SpatialMath for positions (vector3 and transform), and KeyframedMovement for the actual sliding.
  2. class<final_super>(component): This tells Verse, "I am making a new type of Component." It’s like creating a new Blueprint Class you can drop onto any entity.
  3. @editable var SlideDistance<public>:float: An editable setting. Because it’s @editable and <public>, it shows up in the editor panel so you can tune it without rewriting code.
  4. OnSimulate<override>()<suspends>: This runs when the entity enters the running scene. The <suspends> part means it’s allowed to wait — perfect for animations that take time.
  5. Entity.GetComponent[keyframed_movement_component]: Every component knows its Entity. Here we ask that entity for its movement "motor." The square brackets mean the call can fail (no motor attached), so it lives inside an if.
  6. keyframed_movement_delta: One leg of the trip: a relative Transform (move SlideDistance centimeters Forward), a Duration, and an Easing function.
  7. SetKeyframes + Play(): SetKeyframes loads the playlist (our one keyframe, oneshot playback = play once and stop). Play() presses the start button. No Play(), no movement.
  8. FinishedEvent.Await(): The motor fires this event when the animation ends. We wait for it, then Print our announcer line.

Step 3: Putting It in Your Island

  1. Create an entity in your scene (or convert a prop) and give it a Mesh Component so you can see it — a crate or barrel works great.
  2. Add a Keyframed Movement Component to the same entity. This is the "motor" our code looks for — skip this and the crate will sulk in place.
  3. Add your slide_crates_component to the entity as well.
  4. In the Details Panel, you’ll see the properties we defined: Slide Distance and Slide Seconds.
  5. Point the entity the direction you want the slide to go (the keyframe moves it along its Forward axis), and set Slide Distance in centimeters.
  6. Hit Play. Watch your crate slide.

Try It Yourself

The crate slides, but it’s a bit one-dimensional. Let’s make it chaotic.

Challenge: Create a "Loot Drop."

  1. Create a new component (copy slide_crates_component as a starting point).
  2. Instead of sliding forward, make it drop from the sky to the ground.
  3. Use a float variable for DropHeight and set the keyframe’s Translation to Up := -DropHeight (remember: keyframes are relative — negative Up means "fall").
  4. Hint: If you ever need the entity’s current world position, it’s Entity.GetGlobalTransform().Translation.

Don't worry if you get stuck on the math. The goal is to get the object moving from High Y to Low Y. If you can make a loot box fall from the ceiling when a player enters a trigger, you’ve won.

Recap

  • Scene Graph treats objects as Entities with Components. It’s modular and clean.
  • Keyframed Movement lets you define paths and speeds without complex math.
  • Easing makes movement feel natural (snappy or smooth) rather than robotic.
  • Verse Components let you reuse your logic across multiple objects.

You’re no longer just placing props. You’re directing actors on a stage. Now go make something that moves, shakes, or explodes. The island is yours.

References

  • https://dev.epicgames.com/documentation/en-us/fortnite/create-platformer-02-moving-entities-using-animations-in-scene-graph-in-unreal-editor-for-fortnite
  • https://dev.epicgames.com/documentation/en-us/fortnite/create-platformer-03-building-your-platformer-with-prefabs-in-unreal-editor-for-fortnite
  • https://dev.epicgames.com/documentation/en-us/uefn/30-10-release-notes-in-unreal-editor-for-fortnite
  • https://dev.epicgames.com/documentation/en-us/fortnite/30-10-fortnite-ecosystem-updates-and-release-notes-in-creative-and-unreal-editor-for-fortnite
  • https://dev.epicgames.com/documentation/fortnite/verse-api/versedotorg/scenegraph/keyframedmovement/keyframed_movement_component
🔒

Keep going — free

You've read the intro. The rest of this lesson is free for members. Sign in to continue and track your progress.

Sign in free to continue this lesson
Pass the quiz above to chart this quest in your Journal.

Sources

/guides/animate-to-targets-component-verse
Source

Biloxi Studios original lesson

Guided course

Add this lesson to your free study plan.

🧭 The Keeper’s log

Quest complete? Chart your next heading from the 🌊 The Deeps expedition.

⛵ Take me there