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`.- new():
CFrame - new(Position:
Vector3):CFrame - new(X:
Number, Y:Number, Z:Number):CFrame - Angles(RotationX:
Number, RotationY:Number, RotationZ:Number):CFrame - lookAt(Position:
Vector3, Target:Vector3):CFrame
Properties
Position
Vector3The 3D position component of the CFrame.
Rotation
CFrameThe 3D rotation component of the CFrame, with the position components reset to zero.
X
NumberThe X-axis coordinate of the CFrame’s position component.
Y
NumberThe Y-axis coordinate of the CFrame’s position component.
Z
NumberThe Z-axis coordinate of the CFrame’s position component.
LookVector
Vector3A normalized vector pointing in the forward direction of the CFrame.
RightVector
Vector3A normalized vector pointing in the right direction of the CFrame.
UpVector
Vector3A normalized vector pointing out of the top side of the CFrame.
XVector
Vector3The X component of the CFrame’s rotation matrix. Equivalent to RightVector.
YVector
Vector3The Y component of the CFrame’s rotation matrix. Equivalent to UpVector.
ZVector
Vector3The Z component of the CFrame’s rotation matrix. Equivalent to the negated LookVector (-LookVector).
Constructors
new()
CFrameReturns a blank
CFramelocated at the world origin with no rotation.
new(Position: Vector3)
CFrameReturns a new
CFramefrom a givenVector3position with no rotation.
new(X: Number, Y: Number, Z: Number)
CFrameReturns a new
CFramefrom the given spatial coordinates with no rotation.
Angles(RotationX: Number, RotationY: Number, RotationZ: Number)
CFrameReturns a new
CFramerotated around the X, Y and Z axes by the given angles specified in radians.
lookAt(Position: Vector3, Target: Vector3)
CFrameReturns a new
CFramelocated at thePositioncoordinates and rotated to point directly toward theTargetcoordinates.