Skip to content

Class: ComponentTransform

Methods

NameDescription
:move(value)
:rotate(value)
:rotateByAxis(axis,angle)
:rotateX(angle)
:rotateY(angle)
:rotateZ(angle)
:scale(value)
:setParent(entityId,parent)
:translate(value)

Fields

NameTypeDescription
kinematicboolean
orientationQuaternionOrientation of the transform (readonly)
parentComponentTransform|nilParent object (readonly)
positionVector3fPosition of the transform (readonly)
staticboolean
transformMatrix4x4f

Method declarations

Method: move

lua
function ComponentTransform:move(
    value
) end

Parameters:

Method: rotate

lua
function ComponentTransform:rotate(
    value
) end

Parameters:

Method: rotateByAxis

lua
function ComponentTransform:rotateByAxis(
    axis,
    angle
) end

Parameters:

Method: rotateX

lua
function ComponentTransform:rotateX(
    angle
) end

Parameters:

  • angle (number)

Method: rotateY

lua
function ComponentTransform:rotateY(
    angle
) end

Parameters:

  • angle (number)

Method: rotateZ

lua
function ComponentTransform:rotateZ(
    angle
) end

Parameters:

  • angle (number)

Method: scale

lua
function ComponentTransform:scale(
    value
) end

Parameters:

Method: setParent

lua
function ComponentTransform:setParent(
    entityId,
    parent
) end

Parameters:

  • entityId (integer)
  • parent (ComponentTransform|nil)

Method: translate

lua
function ComponentTransform:translate(
    value
) end

Parameters:

Field declarations

Field: kinematic

Type: boolean

Field: orientation

Orientation of the transform (readonly)

Type: Quaternion

Field: parent

Parent object (readonly)

Type: ComponentTransform|nil

Field: position

Position of the transform (readonly)

Type: Vector3f

Field: static

Type: boolean

Field: transform

Type: Matrix4x4f