Verse Library verse

05 Making Props That Scale

Implements a custom movable prop class that smoothly scales toward target vectors or referenced props.

extracted-snippets/documentation/en-us/fortnite/animating-prop-movement-5-scaling-props-in-verse/05-making-props-that-scale.verse

# Source URL: https://dev.epicgames.com/documentation/en-us/fortnite/animating-prop-movement-5-scaling-props-in-verse
# Local doc:  epic-docs/documentation/en-us/fortnite/animating-prop-movement-5-scaling-props-in-verse.md
# Section:    Making Props that Scale
using { /Fortnite.com/Devices }
using { /Fortnite.com/Devices/CreativeAnimation }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/SpatialMath }
MatchScaleTargetTip<localizes>:message = "The optional position to move to World Space. Use this if you do not want to set a MoveTarget."
# A prop that scales towards either a given scale or a creative prop's scale.
scaling_prop<public> := class<concrete>(movable_prop):
# The array of vector3 targets for the RootProp to scale to.
@editable {ToolTip := MoveTargetsTip}
var ScaleTargets:[]vector3= array{}
# The optional creative prop for the RootProp to match scale to.
@editable {ToolTip := MatchScaleTargetTip}
var MatchScaleTarget:?creative_prop = false
# The scale the prop is currently targeting.
var TargetScale:vector3 = vector3{}

Comments

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