createOrbitAnimation

@JvmStatic
fun createOrbitAnimation(name: String = "", duration: Float = 0.0f, axis: Vector3 = Vector3(0f, 1f, 0f), startTransform: Transform = Transform(), spinClockwise: Boolean = true, orientToPath: Boolean = false, rotationCount: Float = 0.0f, delay: Float = 0.0f, repeatMode: RepeatMode = RepeatMode.RESTART, repeatCount: Int = 0, offset: Float = 0.0f, speed: Float = 1.0f, trimStart: Float? = null, trimEnd: Float? = null, trimDuration: Float? = null): OrbitAnimation

Create an OrbitAnimation object with the specified parameters.

Return

An OrbitAnimation object with the specified parameters.

Parameters

name

The name of the animation.

duration

The duration of the animation in seconds.

axis

The direction vector of the revolution axis (normalized internally).

startTransform

The object's initial transform (position / rotation / scale) at animation start.

spinClockwise

Whether the orbit proceeds in a clockwise direction.

orientToPath

If true, the object's orientation continuously aligns to the tangent of its orbital path (i.e., faces direction of motion).

rotationCount

Number of full revolutions during the entire animation duration.

delay

The delay of the animation in seconds.

repeatMode

The repeat mode of the animation.

repeatCount

How many times an animation is repeated. Use INFINITE to repeat indefinitely, or a non-negative integer. For example, a value of 1 means that the animation is repeated once after the initial playback ends, so the animation plays a total of two times. The default value is 0, which means no repetition.

offset

The offset of the animation in seconds.

speed

The speed of the animation.

trimStart

The start time of the trimmed animation in seconds.

trimEnd

The end time of the trimmed animation in seconds.

trimDuration

The duration of the trimmed animation in seconds.