Verse Library verse

11 Rotating Prop Verse

Defines the full rotating prop class layout, including editable properties and internal rotation variables.

extracted-snippets/documentation/en-us/uefn/animating-prop-movement-4-rotating-props-in-verse/11-rotating-prop-verse.verse

# Source URL: https://dev.epicgames.com/documentation/en-us/uefn/animating-prop-movement-4-rotating-props-in-verse
# Local doc:  epic-docs/documentation/en-us/uefn/animating-prop-movement-4-rotating-props-in-verse.md
# Section:    rotating\_prop.verse
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.

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