# Source URL: https://dev.epicgames.com/documentation/en-us/uefn/animating-prop-movement-2-moving-props-with-animations-in-verse
# Local doc: epic-docs/documentation/en-us/uefn/animating-prop-movement-2-moving-props-with-animations-in-verse.md
# Section: movement\_behaviors.verse
# This file stores functions common to animating creative props using keyframes.
# It also defines the move_to_ease_type enum to help in building animations.
using { /Fortnite.com/Devices }
using { /UnrealEngine.com/Temporary/SpatialMath }
using { /Fortnite.com/Characters}
using { /Fortnite.com/Devices/CreativeAnimation }
# Represents the different movement easing types.
move_to_ease_type<public> := enum {Linear, Ease, EaseIn, EaseOut, EaseInOut}
# Return the cubic_bezier_parameters based on the given move_to_ease_type.
GetCubicBezierForEaseType(EaseType:move_to_ease_type):cubic_bezier_parameters=
case (EaseType):
move_to_ease_type.Linear => InterpolationTypes.Linear
move_to_ease_type.Ease => InterpolationTypes.Ease
move_to_ease_type.EaseIn => InterpolationTypes.EaseIn
move_to_ease_type.EaseOut => InterpolationTypes.EaseOut
move_to_ease_type.EaseInOut => InterpolationTypes.EaseInOut
# Initializes a vector3 with all values set to 1.0.
VectorOnes<public>:vector3 = vector3{X:=1.0, Y:=1.0, Z:=1.0}
# An overload of MoveToEase() that changes the position of the prop while keeping the rotation and scale the same.
(CreativeProp:creative_prop).MoveToEase<public>(Position:vector3, Duration:float, EaseType:move_to_ease_type, AnimationMode:animation_mode)<suspends>:void=
CreativeProp.MoveToEase(Position, IdentityRotation(), VectorOnes, Duration, EaseType, AnimationMode)
# An overload of MoveToEase() that changes the rotation of the prop while keeping the position and scale the same.
Verse Library
verse
14 Movement Behaviors Verse
Defines easing enums, bezier mappers, and utility overloads to streamline prop animations.
extracted-snippets/documentation/en-us/uefn/animating-prop-movement-2-moving-props-with-animations-in-verse/14-movement-behaviors-verse.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.