Skip to content

CFrame


[!NOTE] CFrames do not exist in Vortex right now, so all of this information is taken from Roblox’s CFrame.

Summary

Properties Properties of a `CFrame`.

Constructors Constructors of a `CFrame`.

Properties

Position

Vector3

The 3D position component of the CFrame.


Rotation

CFrame

The 3D rotation component of the CFrame, with the position components reset to zero.


X

Number

The X-axis coordinate of the CFrame’s position component.


Y

Number

The Y-axis coordinate of the CFrame’s position component.


Z

Number

The Z-axis coordinate of the CFrame’s position component.


LookVector

Vector3

A normalized vector pointing in the forward direction of the CFrame.


RightVector

Vector3

A normalized vector pointing in the right direction of the CFrame.


UpVector

Vector3

A normalized vector pointing out of the top side of the CFrame.


XVector

Vector3

The X component of the CFrame’s rotation matrix. Equivalent to RightVector.


YVector

Vector3

The Y component of the CFrame’s rotation matrix. Equivalent to UpVector.


ZVector

Vector3

The Z component of the CFrame’s rotation matrix. Equivalent to the negated LookVector (-LookVector).


Constructors

new()

CFrame

Returns a blank CFrame located at the world origin with no rotation.


new(Position: Vector3)

CFrame

Returns a new CFrame from a given Vector3 position with no rotation.


new(X: Number, Y: Number, Z: Number)

CFrame

Returns a new CFrame from the given spatial coordinates with no rotation.


Angles(RotationX: Number, RotationY: Number, RotationZ: Number)

CFrame

Returns a new CFrame rotated around the X, Y and Z axes by the given angles specified in radians.


lookAt(Position: Vector3, Target: Vector3)

CFrame

Returns a new CFrame located at the Position coordinates and rotated to point directly toward the Target coordinates.