NoClip
constNoClip:object
Defined in: client/api.d.ts:530
The game’s fly camera, as the console’s tfc runs it: while enabled the local player’s controls fly the camera through walls instead of moving the player.
Type Declaration
Section titled “Type Declaration”disable()
Section titled “disable()”disable(
options?):void
Leaves the fly camera for the camera the player had.
Parameters
Section titled “Parameters”options?
Section titled “options?”movePlayer: first place the player where the camera is, facing its yaw. False by default.
movePlayer?
Section titled “movePlayer?”boolean
Returns
Section titled “Returns”void
enable()
Section titled “enable()”enable(
options?):boolean
Enters the fly camera where the camera is now; it is left again once this resource stops. True once enabled; false while there is no player in a cell, or the camera is already held by something else.
Parameters
Section titled “Parameters”options?
Section titled “options?”freezeWorld: stop time while flying, as tfc 1 does. False by default.
freezeWorld?
Section titled “freezeWorld?”boolean
Returns
Section titled “Returns”boolean
getPosition()
Section titled “getPosition()”getPosition(): {
x:number;y:number;z:number; } |null
Where the fly camera is, in world units; null while disabled.
Returns
Section titled “Returns”{ x: number; y: number; z: number; } | null
getRotation()
Section titled “getRotation()”getRotation(): {
pitch:number;yaw:number; } |null
The fly camera’s pitch and yaw, radians in [0, 2pi); yaw 0 faces +Y, clockwise. Null while disabled.
Returns
Section titled “Returns”{ pitch: number; yaw: number; } | null
getSpeed()
Section titled “getSpeed()”getSpeed():
object
The fly camera’s speeds: movement per frame of full input, look, and the multiplier while running.
Returns
Section titled “Returns”object
look:
number
move:
number
run:
number
isEnabled()
Section titled “isEnabled()”isEnabled():
boolean
Whether NoClip holds the fly camera. Leaving it with the console’s tfc counts as disabling it.
Returns
Section titled “Returns”boolean
setPosition()
Section titled “setPosition()”setPosition(
x,y,z):boolean
Moves the fly camera; input keeps flying it from there. False while disabled.
Parameters
Section titled “Parameters”number
World units.
number
World units.
number
World units.
Returns
Section titled “Returns”boolean
setRotation()
Section titled “setRotation()”setRotation(
pitch,yaw):boolean
Turns the fly camera; there is no roll. False while disabled.
Parameters
Section titled “Parameters”number
Radians.
number
Radians; 0 faces +Y, clockwise.
Returns
Section titled “Returns”boolean
setSpeed()
Section titled “setSpeed()”setSpeed(
speeds):void
Sets the fly camera’s speeds, as the console’s sucsm does for move and look. The game’s own come back on disconnect.
Parameters
Section titled “Parameters”speeds
Section titled “speeds”The speeds to change, each above 0; the others are kept.
number
number
number
Returns
Section titled “Returns”void