# Source URL: https://dev.epicgames.com/documentation/en-us/fortnite/animating-prop-movement-6-combining-movement-rotation-and-scale-in-verse
# Local doc: epic-docs/documentation/en-us/fortnite/animating-prop-movement-6-combining-movement-rotation-and-scale-in-verse.md
# Section: Building Keyframes on a Loop
# Builds an array of keyframes that animate movement and rotation from the OriginalTransform to the TargetTransform.
BuildMovingAnimationKeyframes(MoveDuration:float, RotationRate:float, AdditionalRotation:rotation, OriginalTransform:transform, TargetTransform:transform,MoveEaseType:move_to_ease_type, UseEasePerKeyframe:logic):[]keyframe_delta=
# The array of keyframes to return.
var Keyframes:[]keyframe_delta = array{}
# The total amount of time spent animating.
var TotalTime:float = 0.0
# The starting transform for building keyframes. This is the
# transform of the RootProp at the start of each keyframe.
var StartTransform:transform = OriginalTransform
# The ending transform for building keyframes. This is the
# transform of the RootProp at the end of each keyframe.
var EndTransform:transform = OriginalTransform
# The actual rotation to apply to the RootProp. Usually this is the
# AdditionalRotation, but will change in cases with fractional rotations.
var RotationToApply:rotation = AdditionalRotation
# The time it takes for each keyframe of animation to complete.
# This is initialized to 1.0 / Rotation rate since the RootProp needs to make a
# RotationRate number of rotations per second.
var AnimationTime:float = 1.0 / RotationRate
# The total number of rotations to make.
TotalRotations:float = MoveDuration * RotationRate
# The time it takes one rotation to complete.
TimePerRotation:float = MoveDuration/TotalRotations
# Build each keyframe of animation and add it to the Keyframes array.
# The loop breaks when the TotalTime goes past the MoveDuration.
loop:
# Add the TimePerRotation to the TotalTime.
Verse Library
verse
17 Building Keyframes On A Loop
Calculates and returns an array of transform keyframes for combined translation, rotation, and scaling.
extracted-snippets/documentation/en-us/fortnite/animating-prop-movement-6-combining-movement-rotation-and-scale-in-verse/17-building-keyframes-on-a-loop.verse
Sign in free to read the full source 🌴
This Verse Library file is members-only. Create a free account to view the complete source and download the .verse file.