Verse Library verse

06 Making Props That Rotate

Implements a complete Creative device for rotating props with configurable angles, targets, and loop settings via editable properties.

extracted-snippets/documentation/en-us/fortnite/animating-prop-movement-4-rotating-props-in-verse/06-making-props-that-rotate.verse

# Source URL: https://dev.epicgames.com/documentation/en-us/fortnite/animating-prop-movement-4-rotating-props-in-verse
# Local doc:  epic-docs/documentation/en-us/fortnite/animating-prop-movement-4-rotating-props-in-verse.md
# Section:    Making Props that Rotate
using { /Fortnite.com/Devices }
using { /Fortnite.com/Devices/CreativeAnimation }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/SpatialMath }
AdditionalRotationTip<localizes>:message = "The rotation to apply to the RootProp."
ShouldRotateForeverTip<localizes>:message = "Whether the RootProp should rotate forever."
MatchRotationTargetTip<localizes>:message = "The optional prop whose rotation the RootProp should rotate to. Use this if you do not want to set an Additional Rotation."
# A prop that rotates by an additional rotation or rotates to match
# a creative prop's rotation.
rotating_prop<public> := class<concrete>(movable_prop):
# The additional rotation to apply to the RootProp.
@editable {ToolTip := AdditionalRotationTip}
AdditionalRotation:rotation = rotation{}
# Whether the RootProp should rotate forever.
@editable {ToolTip := ShouldRotateForeverTip}
ShouldRotateForever:logic = true
# The optional prop whose rotation RootProp should rotate to match. Use this if you
# do not want to set an additional rotation.
@editable {ToolTip := MatchRotationTargetTip}
MatchRotationTarget:?creative_prop = false
# The rotation the prop is currently rotating towards.
var TargetRotation:rotation = rotation{}

Comments

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