TransformComponent

@MainThread
class TransformComponent : Component

A Component that manipulates the scale, rotation, and position of the entity.

Constructors

Link copied to clipboard
constructor()

The default constructor.

constructor(transform: Transform)

Creates a TransformComponent initialized with the values from the given Transform.

constructor(position: Vector3, rotation: EulerAngles, scale: Vector3)

Creates a TransformComponent with the specified position, rotation, and scale.

constructor(position: Vector3, rotation: Quat, scale: Vector3)

Creates a TransformComponent with the specified position, rotation, and scale.

Properties

Link copied to clipboard

The eulerAngles in the local coordinate which is used to control the transform. The default value is Vector3(0F, 0F, 0F).

Link copied to clipboard

The position in the local coordinate which is used to control the transform. The default value is Vector3(0F, 0F, 0F), measured in meters (m).

Link copied to clipboard

The quaternion in the local coordinate which is used to control the transform. The default value is Vector3(0F, 0F, 0F).

Link copied to clipboard

The scale vector in the local coordinate which is used to control the transform. The default value is Vector3(1F, 1F, 1F).

Functions

Link copied to clipboard
open override fun clone(): Component

Creates and returns a copy of this Component instance.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard

Gets the local matrix of the TransformComponent.

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun scaleBy(factor: Float): TransformComponent

Scales the current TransformComponent by the given factor.

Link copied to clipboard

Sets the eulerAngles of the TransformComponent.

Link copied to clipboard

Sets the location of the TransformComponent.

Link copied to clipboard

Sets the quaternion for the TransformComponent.

Link copied to clipboard

Sets the scale vector of the TransformComponent.

Link copied to clipboard
open override fun toString(): String