Verse Library verse

28 Animating Prop Verse

Defines a custom prop class extending movable prop with editable rotation, scaling, and movement targets.

extracted-snippets/documentation/en-us/fortnite/animating-prop-movement-6-combining-movement-rotation-and-scale-in-verse/28-animating-prop-verse.verse

# 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:    animating\_prop.verse
using { /Fortnite.com/Devices }
using { /Fortnite.com/Devices/CreativeAnimation }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/SpatialMath }
RotationRateTip<localizes>:message := "The time it takes to make one AdditionalRotation in seconds."
UseEasePerKeyframeTip<localizes>:message := "Whether this prop should use the MoveEaseType for each keyframe. False will use the Linear ease type on each frame."
# A prop that translates, rotates, and scales to a destination using animation.
animating_prop<public> := class<concrete>(movable_prop):
# The additional rotation to apply to the RootProp per keyframe.
@editable {ToolTip := AdditionalRotationTip}
AdditionalRotation:rotation = rotation{}
# The time it takes to make one AdditionalRotation in seconds.
@editable {ToolTip := RotationRateTip}
var RotationRate:float = 1.0
# Whether this prop should use the MoveEaseType per each frame of animation.
# Setting this to false will use the linear MoveEaseType on each frame.
@editable {ToolTip := UseEasePerKeyframeTip}
UseEasePerKeyframe:logic = true
# The Creative prop target for the RootProp to move toward. The rootprop will also copy
# the scale of each MoveTarget.
@editable {ToolTip := MoveTargetsTip}
var MoveTargets:[]creative_prop = array{}
# The transform the prop is currently targeting.
var TargetTransform:transform = transform{}
# Move and rotate the RootProp toward the MoveTarget, or MoveTransform if one is set.
Move<override>()<suspends>:void=
# If there are no targets to move to, this prop will rotate in place.

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.

Sign in with Discord

Comments

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