Verse Library verse

23 Building Keyframes With Code

Initializes platformer entity position using keyframe segments and pauses execution.

extracted-snippets/documentation/en-us/fortnite/create-platformer-02-moving-entities-using-animations-in-scene-graph-in-unreal-editor-for-fortnite/23-building-keyframes-with-code.verse

# Source URL: https://dev.epicgames.com/documentation/en-us/fortnite/create-platformer-02-moving-entities-using-animations-in-scene-graph-in-unreal-editor-for-fortnite
# Local doc:  epic-docs/documentation/en-us/fortnite/create-platformer-02-moving-entities-using-animations-in-scene-graph-in-unreal-editor-for-fortnite.md
# Section:    Building Keyframes with Code
# Position this entity in the correct starting position.
if:
KeyframedMovementComponent := Entity.GetComponent[keyframed_movement_component]
StartingTransform :=
FirstSegment := InSegments[0].SegmentStartPosition?.GetGlobalTransform()
then:
Entity.SetGlobalTransform(StartingTransform)
# Sleep for initial pause.
Sleep(InitialPauseSeconds)

Comments

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