Skip to content

TransformModel

march edited this page Jan 9, 2025 · 3 revisions

Transforms a named model's position, angle, and/or scale over a period of time.

Properties

Time:number

⠀⠀⠀⠀The time to start the transform.

Length:number (default 0.5)

⠀⠀⠀⠀The time it takes to reach the desired transformation.


Target:string

⠀⠀⠀⠀The named model name for the model you want to transform

Position:vector

⠀⠀⠀⠀Optional. If set, the model will move from its current position (before this instruction) to the target position

Rotation:angle

⠀⠀⠀⠀Optional. If set, the model will rotate from its current angles (before this instruction) to the target angles

Scale:vector

⠀⠀⠀⠀Optional. If set, the model will scale from its current position (before this instruction) to the target scale


LocalToParent:boolean (default false)

⠀⠀⠀⠀If true, Position and Rotation should be provided as a local vector/angle to the parent of the target. Otherwise, uses world position/rotation.


Easing:function (default math.ease.InOutQuad)

⠀⠀⠀⠀An easing function for these parameters that takes in a 0 - 1 number and returns a 0 - 1 number. Linear movement can be accomplished using a simple lambda: function(x) return x end

Clone this wiki locally