CubicBezier
Use a cubic Bézier curve (opens in a new tab) to create custom easing for entity transitions. This allows for precise control over animation timing and smoothness.
The Bézier curve is defined by two control points (x1, y1
, x2, y2
) that shape the acceleration and deceleration of the transition.
BezierRotateEntity
Rotates an entity using a cubic Bézier easing curve.
BezierRotateEntity(x1, y1, x2, y2, entity, targetRotation, duration, rotationMode?)
x1
,y1
,x2
,y2
:number
Bézier control points. Must be between0.0
and1.0
.entity
:number
The entity to rotate.targetRotation
:vector3
The target world rotation (in degrees).duration
:number
Duration of the rotation in seconds.rotationMode?
:string
preset"clockwise"
or"counterclockwise"
Defaults to the shortest path.
BezierMoveEntity
Moves an entity using a cubic Bézier easing curve.
BezierMoveEntity(x1, y1, x2, y2, entity, targetPosition, duration)
x1
,y1
,x2
,y2
:number
Bézier control points.entity
:number
The entity to move.targetPosition
:vector3
The world position to move the entity to.duration
:number
Duration of the movement in seconds.
BezierTransitionCubicBezier
Moves and rotates an entity simultaneously using a cubic Bézier easing curve.
BezierTransitionCubicBezier(x1, y1, x2, y2, entity, targetRotation, targetPosition, duration, rotationMode?)
x1
,y1
,x2
,y2
:number
Bézier control points.entity
:number
The entity to transform.targetRotation
:vector3
The rotation to apply.targetPosition
:vector3
The position to move to.duration
:number
Total time of the transformation.rotationMode?
:string
preset"clockwise"
or"counterclockwise"
Defaults to the shortest path.
About Bézier Curves
Use this tool (opens in a new tab) to visually craft your desired easing curve. For example:
Linear
:(0.0, 0.0, 1.0, 1.0)
Ease In
:(0.42, 0.0, 1.0, 1.0)
Ease Out
:(0.0, 0.0, 0.58, 1.0)
Ease In Out
:(0.42, 0.0, 0.58, 1.0)