SixL client API / game/cam / GameCamMp
Interface: GameCamMp
The gameplay camera: where it is, which way it points and how wide its view is, as of the latest frame.
Remarks
SixL only: the values come from the camera the client received with the latest frame, so they are as fresh as that frame, not a live read of the game.
Methods
attachToEntity()
attachToEntity(cam,entity,xOffset,yOffset,zOffset,isRelative):void
Attaches a script camera to an entity at an offset.
Parameters
cam
number
The camera's handle.
entity
number | { handle: number; }
The entity.
xOffset
number
The offset's x.
yOffset
number
The offset's y.
zOffset
number
The offset's z.
isRelative
boolean
True: the offset turns with the entity.
Returns
void
Remarks
Partial: on a camera this client made (another number does nothing); not yet confirmed in the game.
Example
mp.game.cam.attachToEntity(cam.handle, mp.players.local, 0, -4, 2, true);
attachToPedBone()
attachToPedBone(cam,ped,boneIndex,x,y,z,heading):void
Attaches a script camera to a bone of a ped.
Parameters
cam
number
The camera's handle.
ped
number | { handle: number; }
The ped.
boneIndex
number
The bone, as the game numbers it.
x
number
The offset's x.
y
number
The offset's y.
z
number
The offset's z.
heading
boolean
True: the camera turns with the ped.
Returns
void
Remarks
Partial: on a camera this client made (another number does nothing); not yet confirmed in the game.
Example
mp.game.cam.attachToPedBone(cam.handle, mp.players.local, 0, 0, 0.5, 0.6, true);
create()
create(name,active?):Promise<number>
Makes a script camera.
Parameters
name
string | number
The camera's name or type key, as for GameCamMp.createCam.
active?
boolean
Whether the camera is the active one at once. Default true.
Returns
Promise<number>
A Promise of the camera's handle, as for the method it names.
Remarks
RAGE MP's name for GameCamMp.createCam; it does exactly what that method does.
Example
const cam = await mp.game.cam.create('default', true);
createCam()
createCam(name,active?):Promise<number>
Makes a script camera. The game makes it on the next frame; until then the handle is not known.
Parameters
name
string | number
The camera's name. 'default', the RAGE MP name of the default scripted camera and the RAGE MP name of the default scripted fly camera are accepted. Any other name gives the default scripted camera, because VI has no other named camera types. A number is the camera type's key, as it is.
active?
boolean
Whether the camera is the active one at once. Default true.
Returns
Promise<number>
A Promise of the camera's handle (a number), resolved once the game has made the camera.
Remarks
SixL only: RAGE MP returns the handle at once; here the handle comes as a Promise because the game makes the camera on the next frame. The camera is removed when the client leaves the server.
Example
const cam = await mp.game.cam.createCam('default', true);
createCamera()
createCamera(name,active?):Promise<number>
Makes a script camera.
Parameters
name
string | number
The camera's name or type key, as for GameCamMp.createCam.
active?
boolean
Whether the camera is the active one at once. Default true.
Returns
Promise<number>
A Promise of the camera's handle, as for the method it names.
Remarks
RAGE MP's name for GameCamMp.createCam; it does exactly what that method does.
Example
const cam = await mp.game.cam.createCamera('default', true);
createCameraWithParams()
createCameraWithParams(name,posX,posY,posZ,rotX,rotY,rotZ,fov,active?,rotationOrder?):Promise<number>
Makes a script camera with its position, rotation and field of view.
Parameters
name
string | number
The camera's name or type key.
posX
number
The x position in metres.
posY
number
The y position in metres.
posZ
number
The z position in metres.
rotX
number
The pitch in degrees.
rotY
number
The roll in degrees.
rotZ
number
The yaw in degrees.
fov
number
The vertical field of view in degrees.
active?
boolean
Whether the camera is the active one at once. Default true.
rotationOrder?
number
Accepted for RAGE MP compatibility; ignored.
Returns
Promise<number>
A Promise of the camera's handle.
Remarks
RAGE MP's name for GameCamMp.createCamWithParams; it does exactly what that method does.
Example
const cam = await mp.game.cam.createCameraWithParams('default', 0, 0, 80, -20, 0, 90, 50, true);
createCamWithParams()
createCamWithParams(name,posX,posY,posZ,rotX,rotY,rotZ,fov,active?,rotationOrder?):Promise<number>
Makes a script camera with its position, rotation and field of view.
Parameters
name
string | number
The camera's name, as for GameCamMp.createCam.
posX
number
The x position in metres.
posY
number
The y position in metres.
posZ
number
The z position in metres.
rotX
number
The pitch in degrees (positive looks up).
rotY
number
The roll in degrees.
rotZ
number
The yaw in degrees (0 is north, 90 is west).
fov
number
The vertical field of view in degrees.
active?
boolean
Whether the camera is the active one at once. Default true.
rotationOrder?
number
Accepted for RAGE MP compatibility; ignored.
Returns
Promise<number>
A Promise of the camera's handle (a number), resolved once the game has made the camera.
Remarks
SixL only in its Promise, as GameCamMp.createCam. The camera is removed when the client leaves.
Example
const cam = await mp.game.cam.createCamWithParams('default', 0, 0, 80, -20, 0, 90, 50, true);
createEra()
createEra(name,active?):Promise<number>
Makes a script camera.
Parameters
name
string | number
The camera's name or type key, as for GameCamMp.createCam.
active?
boolean
Whether the camera is the active one at once. Default true.
Returns
Promise<number>
A Promise of the camera's handle, as for the method it names.
Remarks
RAGE MP's name for GameCamMp.createCam; it does exactly what that method does.
Example
const cam = await mp.game.cam.createEra('default', true);
createEraWithParams()
createEraWithParams(name,posX,posY,posZ,rotX,rotY,rotZ,fov,active?,rotationOrder?):Promise<number>
Makes a script camera with its position, rotation and field of view.
Parameters
name
string | number
The camera's name or type key.
posX
number
The x position in metres.
posY
number
The y position in metres.
posZ
number
The z position in metres.
rotX
number
The pitch in degrees.
rotY
number
The roll in degrees.
rotZ
number
The yaw in degrees.
fov
number
The vertical field of view in degrees.
active?
boolean
Whether the camera is the active one at once. Default true.
rotationOrder?
number
Accepted for RAGE MP compatibility; ignored.
Returns
Promise<number>
A Promise of the camera's handle.
Remarks
RAGE MP's name for GameCamMp.createCamWithParams; it does exactly what that method does.
Example
const cam = await mp.game.cam.createEraWithParams('default', 0, 0, 80, -20, 0, 90, 50, true);
createWithParams()
createWithParams(name,posX,posY,posZ,rotX,rotY,rotZ,fov,active?,rotationOrder?):Promise<number>
Makes a script camera with its position, rotation and field of view.
Parameters
name
string | number
The camera's name or type key.
posX
number
The x position in metres.
posY
number
The y position in metres.
posZ
number
The z position in metres.
rotX
number
The pitch in degrees.
rotY
number
The roll in degrees.
rotZ
number
The yaw in degrees.
fov
number
The vertical field of view in degrees.
active?
boolean
Whether the camera is the active one at once. Default true.
rotationOrder?
number
Accepted for RAGE MP compatibility; ignored.
Returns
Promise<number>
A Promise of the camera's handle.
Remarks
RAGE MP's name for GameCamMp.createCamWithParams; it does exactly what that method does.
Example
const cam = await mp.game.cam.createWithParams('default', 0, 0, 80, -20, 0, 90, 50, true);
destroy()
destroy(cam,thisScriptCheck?):void
Destroys a script camera.
Parameters
cam
number
The camera's handle.
thisScriptCheck?
boolean
Accepted for RAGE MP compatibility; ignored.
Returns
void
Remarks
RAGE MP's name for GameCamMp.destroyCam; it does exactly what that method does.
Example
mp.game.cam.destroy(cam);
destroyAllCams()
destroyAllCams(thisScriptCheck?):void
Destroys every script camera this client made.
Parameters
thisScriptCheck?
boolean
Accepted for RAGE MP compatibility; ignored.
Returns
void
Example
mp.game.cam.destroyAllCams(false);
destroyAllS()
destroyAllS(thisScriptCheck?):void
Destroys every script camera.
Parameters
thisScriptCheck?
boolean
Accepted for RAGE MP compatibility; ignored.
Returns
void
Remarks
RAGE MP's name for GameCamMp.destroyAllCams; it does exactly what that method does.
Example
mp.game.cam.destroyAllS();
destroyCam()
destroyCam(cam,thisScriptCheck?):void
Destroys a script camera.
Parameters
cam
number
The camera's handle, from GameCamMp.createCam.
thisScriptCheck?
boolean
Accepted for RAGE MP compatibility; ignored.
Returns
void
Remarks
A handle that does not exist is ignored. After this the camera no longer exists and its getters return the defaults.
Example
mp.game.cam.destroyCam(cam);
detach()
detach(cam):void
Detaches a script camera.
Parameters
cam
number
The camera's handle.
Returns
void
Remarks
Partial: on a camera this client made (another number does nothing); not yet confirmed in the game.
Example
mp.game.cam.detach(cam.handle);
doesCamExist()
doesCamExist(cam):boolean
Whether a script camera exists.
Parameters
cam
number
The camera's handle.
Returns
boolean
true for a handle made by GameCamMp.createCam and not destroyed yet; otherwise false.
Example
if (mp.game.cam.doesCamExist(cam)) { }
doesExist()
doesExist(cam):boolean
Whether a script camera exists.
Parameters
cam
number
The camera's handle.
Returns
boolean
true when the camera exists.
Remarks
RAGE MP's name for GameCamMp.doesCamExist; it does exactly what that method does.
Example
const ok = mp.game.cam.doesExist(cam);
doScreenFadeIn()
doScreenFadeIn(duration):void
Fades the screen from black back to the picture over duration milliseconds.
Parameters
duration
number
Milliseconds the fade takes; 0 fades at once.
Returns
void
Example
mp.game.cam.doScreenFadeIn(800);
doScreenFadeOut()
doScreenFadeOut(duration):void
Fades the screen to black over duration milliseconds. The screen stays black until GameCamMp.doScreenFadeIn is called; while it is black the world is not drawn.
Parameters
duration
number
Milliseconds the fade takes; 0 fades at once.
Returns
void
Example
mp.game.cam.doScreenFadeOut(800);
getCamCoord()
getCamCoord(cam):IVector3
The position of a script camera.
Parameters
cam
number
The camera's handle.
Returns
The position last set, in metres; { x: 0, y: 0, z: 0 } for an unknown handle.
Remarks
Returns what was set: the game does not answer for it.
Example
const pos = mp.game.cam.getCamCoord(cam);
getCamFov()
getCamFov(cam):number
The field of view of a script camera.
Parameters
cam
number
The camera's handle.
Returns
number
The field of view last set, in degrees (50 when none was set); 0 for an unknown handle.
Remarks
Returns what was set: the game does not answer for it.
Example
const fov = mp.game.cam.getCamFov(cam);
getCamRot()
getCamRot(cam,rotationOrder?):IVector3
The rotation of a script camera.
Parameters
cam
number
The camera's handle.
rotationOrder?
number
Accepted for RAGE MP compatibility; ignored.
Returns
The rotation last set, in degrees: x the pitch, y the roll, z the yaw; zeros for an unknown handle.
Remarks
Returns what was set: the game does not answer for it.
Example
const rot = mp.game.cam.getCamRot(cam, 2);
getCoord()
getCoord(cam):IVector3
The position of a script camera.
Parameters
cam
number
The camera's handle.
Returns
The position in metres.
Remarks
RAGE MP's name for GameCamMp.getCamCoord; it does exactly what that method does.
Example
const pos = mp.game.cam.getCoord(cam);
getFov()
getFov(cam):number
The field of view of a script camera.
Parameters
cam
number
The camera's handle.
Returns
number
The vertical field of view in degrees.
Remarks
RAGE MP's name for GameCamMp.getCamFov; it does exactly what that method does.
Example
const fov = mp.game.cam.getFov(cam);
getGameplayCamCoord()
getGameplayCamCoord(): IVector3
The position of the gameplay camera.
Returns
The camera's position in metres (x east, y north, z up).
Example
const pos = mp.game.cam.getGameplayCamCoord();
getGameplayCamFov()
getGameplayCamFov(): number
The vertical field of view of the gameplay camera.
Returns
number
The field of view in degrees; 0 when no camera is known yet.
Example
const fov = mp.game.cam.getGameplayCamFov();
getGameplayCamRelativeHeading()
getGameplayCamRelativeHeading():Promise<number>
The heading of the gameplay camera relative to the player's ped.
Returns
Promise<number>
A Promise of the heading in degrees (0 when the camera looks where the ped faces).
Remarks
Partial: not yet confirmed in the game.
Example
const heading = await mp.game.cam.getGameplayCamRelativeHeading();
getGameplayCamRot()
getGameplayCamRot(rotationOrder?):IVector3
The rotation of the gameplay camera.
Parameters
rotationOrder?
number
Accepted for RAGE MP compatibility; ignored, the result is always the same.
Returns
The rotation in degrees: x is the pitch (positive looks up), y the roll, z the yaw (0 is north, 90 is west; counter-clockwise from north).
Example
const rot = mp.game.cam.getGameplayCamRot(2);
getGameplayCoord()
getGameplayCoord(): IVector3
The position of the gameplay camera.
Returns
The camera's position in metres.
Remarks
RAGE MP's name for GameCamMp.getGameplayCamCoord; it does exactly what that method does.
Example
const pos = mp.game.cam.getGameplayCoord();
getGameplayFov()
getGameplayFov(): number
The field of view of the gameplay camera.
Returns
number
The field of view in degrees; 0 when no camera is known yet.
Remarks
RAGE MP's name for GameCamMp.getGameplayCamFov; it does exactly what that method does.
Example
const fov = mp.game.cam.getGameplayFov();
getGameplayRelativeHeading()
getGameplayRelativeHeading():Promise<number>
The same as getGameplayCamRelativeHeading.
Returns
Promise<number>
A Promise of the heading in degrees.
Remarks
Partial: not yet confirmed in the game.
Example
const heading = await mp.game.cam.getGameplayRelativeHeading();
getGameplayRot()
getGameplayRot(rotationOrder?):IVector3
The rotation of the gameplay camera.
Parameters
rotationOrder?
number
Accepted for RAGE MP compatibility; ignored.
Returns
The rotation in degrees.
Remarks
RAGE MP's name for GameCamMp.getGameplayCamRot; it does exactly what that method does.
Example
const rot = mp.game.cam.getGameplayRot(2);
getRendering()
getRendering(): number
The script camera on screen.
Returns
number
The handle of the active script camera while script cameras are rendered; -1 when the gameplay camera is on screen.
Remarks
Uses the same state as GameCamMp.isScriptCamRendering and GameCamMp.isCamActive.
Example
const cam = mp.game.cam.getRendering();
getRot()
getRot(cam,rotationOrder?):IVector3
The rotation of a script camera.
Parameters
cam
number
The camera's handle.
rotationOrder?
number
Accepted for RAGE MP compatibility; ignored.
Returns
The rotation in degrees (pitch, roll, yaw).
Remarks
RAGE MP's name for GameCamMp.getCamRot; it does exactly what that method does.
Example
const rot = mp.game.cam.getRot(cam, 2);
isActive()
isActive(cam):boolean
Whether a script camera is active.
Parameters
cam
number
The camera's handle.
Returns
boolean
true when the camera is active.
Remarks
RAGE MP's name for GameCamMp.isCamActive; it does exactly what that method does.
Example
const on = mp.game.cam.isActive(cam);
isCamActive()
isCamActive(cam):boolean
Whether a script camera is the active one.
Parameters
cam
number
The camera's handle.
Returns
boolean
The value last set with GameCamMp.setCamActive (or at creation); false for an unknown handle.
Remarks
Returns what was set: the game does not answer for it.
Example
const active = mp.game.cam.isCamActive(cam);
isCamRendering()
isCamRendering(cam):boolean
Whether a script camera is on screen: it is the active camera and rendering of script cameras is on.
Parameters
cam
number
The camera's handle.
Returns
boolean
true when the camera is active and GameCamMp.renderScriptCams turned rendering on.
Example
const onScreen = mp.game.cam.isCamRendering(cam);
isCinematicShotActive()
isCinematicShotActive(p0):Promise<boolean>
Whether a cinematic shot of the given kind is playing.
Parameters
p0
number
The shot's hash.
Returns
Promise<boolean>
A Promise of true while the shot plays.
Remarks
Partial: through a game function that is likely, not certain, to be this one; not yet confirmed in the game.
Example
const playing = await mp.game.cam.isCinematicShotActive(shot);
isGameplayHintActive()
isGameplayHintActive():Promise<boolean>
Whether the gameplay camera is following a hint (looking at a point or an entity the game points it at).
Returns
Promise<boolean>
A Promise of true while a hint is active.
Remarks
Partial: not yet confirmed in the game.
Example
const hinted = await mp.game.cam.isGameplayHintActive();
isInterpolating()
isInterpolating(cam):Promise<boolean>
Whether a script camera is still moving.
Parameters
cam
number
The camera's handle.
Returns
Promise<boolean>
A Promise of true while it moves.
Remarks
Partial: on a camera this client made (another number does nothing); not yet confirmed in the game.
Example
const moving = await mp.game.cam.isInterpolating(cam.handle);
isRendering()
isRendering(cam):boolean
Whether a script camera is the one on screen.
Parameters
cam
number
The camera's handle.
Returns
boolean
true when script cameras are rendered and this camera is active.
Remarks
RAGE MP's name for GameCamMp.isCamRendering; it does exactly what that method does.
Example
const shown = mp.game.cam.isRendering(cam);
isScreenFadedIn()
isScreenFadedIn(): boolean
Whether the screen is fully visible (a fade in has finished, or nothing has faded).
Returns
boolean
true when the picture is fully up.
Example
const visible = mp.game.cam.isScreenFadedIn();
isScreenFadedOut()
isScreenFadedOut(): boolean
Whether the screen is fully black (a fade to black has finished).
Returns
boolean
true when the screen is fully faded out.
Remarks
These four queries report the screen's actual fade state as of the latest frame — including fades the game itself runs (loading, cutscenes, death), not only fades a script started. At most one of the four is true at a time; before anything fades, the picture is up, so GameCamMp.isScreenFadedIn is true and the others are false.
Example
if (mp.game.cam.isScreenFadedOut()) mp.game.cam.doScreenFadeIn(800);
isScreenFadingIn()
isScreenFadingIn(): boolean
Whether a fade from black is in progress right now.
Returns
boolean
true while a fade in is running.
Example
const coming = mp.game.cam.isScreenFadingIn();
isScreenFadingOut()
isScreenFadingOut(): boolean
Whether a fade to black is in progress right now.
Returns
boolean
true while a fade out is running.
Example
const going = mp.game.cam.isScreenFadingOut();
isScriptCamRendering()
isScriptCamRendering(): boolean
Whether script cameras are being rendered.
Returns
boolean
The value last set with GameCamMp.renderScriptCams.
Remarks
Returns what was set: the game does not answer for it.
Example
const rendering = mp.game.cam.isScriptCamRendering();
isScriptGlobalShaking()
isScriptGlobalShaking():Promise<boolean>
Whether a script shakes the whole screen.
Returns
Promise<boolean>
A Promise of true while such a shake runs.
Remarks
Partial: not yet confirmed in the game.
Example
const shaking = await mp.game.cam.isScriptGlobalShaking();
isShaking()
isShaking(cam):Promise<boolean>
Whether a script camera shakes.
Parameters
cam
number
The camera's handle.
Returns
Promise<boolean>
A Promise of true while it shakes.
Remarks
Partial: on a camera this client made (another number does nothing); not yet confirmed in the game.
Example
const shaking = await mp.game.cam.isShaking(cam.handle);
isSphereVisible()
isSphereVisible(x,y,z,radius):Promise<boolean>
Whether any part of a sphere is on screen.
Parameters
x
number
The centre's X coordinate, in metres.
y
number
The centre's Y coordinate, in metres.
z
number
The centre's Z coordinate, in metres.
radius
number
The radius, in metres.
Returns
Promise<boolean>
A Promise of true when the sphere can be seen.
Remarks
Partial: not yet confirmed in the game.
Example
const seen = await mp.game.cam.isSphereVisible(0, 0, 70, 1);
pointAtCoord()
pointAtCoord(cam,x,y,z):void
Points a script camera at a position.
Parameters
cam
number
The camera's handle.
x
number
The x position in metres.
y
number
The y position in metres.
z
number
The z position in metres.
Returns
void
Remarks
RAGE MP's name for GameCamMp.pointCamAtCoord; it does exactly what that method does.
Example
mp.game.cam.pointAtCoord(cam, 10, 20, 30);
pointAtEntity()
pointAtEntity(cam,entity,xOffset?,yOffset?,zOffset?,p5?):void
Points a script camera at an entity.
Parameters
cam
number
The camera's handle.
entity
The entity (handle or object).
xOffset?
number
Ignored, as in the method it names.
yOffset?
number
Ignored, as in the method it names.
zOffset?
number
Ignored, as in the method it names.
p5?
boolean
Accepted for RAGE MP compatibility; ignored.
Returns
void
Remarks
RAGE MP's name for GameCamMp.pointCamAtEntity; it does exactly what that method does.
Example
mp.game.cam.pointAtEntity(cam, ped.handle);
pointAtPedBone()
pointAtPedBone(cam,ped,boneIndex?,x?,y?,z?,p6?):void
Points a script camera at a ped.
Parameters
cam
number
The camera's handle.
ped
The ped (handle or object).
boneIndex?
number
Ignored, as in the method it names.
x?
number
Ignored, as in the method it names.
y?
number
Ignored, as in the method it names.
z?
number
Ignored, as in the method it names.
p6?
boolean
Accepted for RAGE MP compatibility; ignored.
Returns
void
Remarks
RAGE MP's name for GameCamMp.pointCamAtPedBone; it does exactly what that method does.
Example
mp.game.cam.pointAtPedBone(cam, ped.handle, 0);
pointCamAtCoord()
pointCamAtCoord(cam,x,y,z):void
Makes a script camera keep looking at a point.
Parameters
cam
number
The camera's handle.
x
number
The x position of the point in metres.
y
number
The y position of the point in metres.
z
number
The z position of the point in metres.
Returns
void
Example
mp.game.cam.pointCamAtCoord(cam, 0, 0, 75);
pointCamAtEntity()
pointCamAtEntity(cam,entity,xOffset?,yOffset?,zOffset?,p5?):void
Makes a script camera keep looking at an entity.
Parameters
cam
number
The camera's handle.
entity
The entity to look at: an entity object, or its handle.
xOffset?
number
Accepted for RAGE MP compatibility; ignored: the camera looks at the entity itself.
yOffset?
number
Accepted for RAGE MP compatibility; ignored.
zOffset?
number
Accepted for RAGE MP compatibility; ignored.
p5?
boolean
Accepted for RAGE MP compatibility; ignored.
Returns
void
Example
mp.game.cam.pointCamAtEntity(cam, player);
pointCamAtPedBone()
pointCamAtPedBone(cam,ped,boneIndex?,x?,y?,z?,p6?):void
Makes a script camera keep looking at a ped.
Parameters
cam
number
The camera's handle.
ped
The ped to look at: an entity object, or its handle.
boneIndex?
number
Accepted for RAGE MP compatibility; ignored: the camera looks at the ped as a whole.
x?
number
Accepted for RAGE MP compatibility; ignored.
y?
number
Accepted for RAGE MP compatibility; ignored.
z?
number
Accepted for RAGE MP compatibility; ignored.
p6?
boolean
Accepted for RAGE MP compatibility; ignored.
Returns
void
Example
mp.game.cam.pointCamAtPedBone(cam, ped, 0, 0, 0, 0, false);
renderScriptCams()
renderScriptCams(render,ease?,easeTime?,p3?,p4?,p5?):void
Turns the rendering of script cameras on or off.
Parameters
render
boolean
true to show the active script camera (the HUD is hidden); false to give the screen back to the gameplay camera.
ease?
boolean
Whether the change eases in over easeTime. Default false.
easeTime?
number
The ease time in milliseconds; used only when ease is true.
p3?
boolean
Accepted for RAGE MP compatibility; ignored.
p4?
boolean
Accepted for RAGE MP compatibility; ignored.
p5?
number
Accepted for RAGE MP compatibility; ignored.
Returns
void
Example
mp.game.cam.renderScriptCams(true, true, 1000);
renderScriptS()
renderScriptS(render,ease?,easeTime?,p3?,p4?,p5?):void
Turns the rendering of script cameras on or off.
Parameters
render
boolean
true to show the active script camera; false to give the screen back to the gameplay camera.
ease?
boolean
Whether the change eases in. Default false.
easeTime?
number
The ease time in milliseconds.
p3?
boolean
Accepted for RAGE MP compatibility; ignored.
p4?
boolean
Accepted for RAGE MP compatibility; ignored.
p5?
number
Accepted for RAGE MP compatibility; ignored.
Returns
void
Remarks
RAGE MP's name for GameCamMp.renderScriptCams; it does exactly what that method does.
Example
mp.game.cam.renderScriptS(true, true, 1000);
setActive()
setActive(cam,active):void
Makes a script camera the active one, or not.
Parameters
cam
number
The camera's handle.
active
boolean
true to activate the camera.
Returns
void
Remarks
RAGE MP's name for GameCamMp.setCamActive; it does exactly what that method does.
Example
mp.game.cam.setActive(cam, true);
setActiveWithInterp()
setActiveWithInterp(camTo,camFrom,duration,easeLocation,easeRotation):void
Makes a script camera active, moving to it smoothly from another.
Parameters
camTo
number
The camera to make active.
camFrom
number
The camera to move from.
duration
number
Milliseconds.
easeLocation
number
How the position eases.
easeRotation
number
How the rotation eases.
Returns
void
Remarks
Partial: on a camera this client made (another number does nothing); not yet confirmed in the game.
Example
mp.game.cam.setActiveWithInterp(camTo, camFrom, 2000, 1, 1);
setCamActive()
setCamActive(cam,active):void
Sets whether a script camera is the active one. The active camera is the one on screen after GameCamMp.renderScriptCams turns rendering on.
Parameters
cam
number
The camera's handle.
active
boolean
true to make it the active camera.
Returns
void
Example
mp.game.cam.setCamActive(cam, true);
setCamCoord()
setCamCoord(cam,x,y,z):void
Sets the position of a script camera.
Parameters
cam
number
The camera's handle.
x
number
The x position in metres.
y
number
The y position in metres.
z
number
The z position in metres (up).
Returns
void
Example
mp.game.cam.setCamCoord(cam, 0, 0, 80);
setCamFov()
setCamFov(cam,fov):void
Sets the field of view of a script camera.
Parameters
cam
number
The camera's handle.
fov
number
The vertical field of view in degrees.
Returns
void
Example
mp.game.cam.setCamFov(cam, 50);
setCamRot()
setCamRot(cam,x,y,z,rotationOrder?):void
Sets the rotation of a script camera.
Parameters
cam
number
The camera's handle.
x
number
The pitch in degrees (positive looks up).
y
number
The roll in degrees.
z
number
The yaw in degrees (0 is north, 90 is west; counter-clockwise from north).
rotationOrder?
number
Accepted for RAGE MP compatibility; ignored.
Returns
void
Example
mp.game.cam.setCamRot(cam, -20, 0, 90);
setCoord()
setCoord(cam,x,y,z):void
Moves a script camera.
Parameters
cam
number
The camera's handle.
x
number
The x position in metres.
y
number
The y position in metres.
z
number
The z position in metres.
Returns
void
Remarks
RAGE MP's name for GameCamMp.setCamCoord; it does exactly what that method does.
Example
mp.game.cam.setCoord(cam, 0, 0, 80);
setFarClip()
setFarClip(cam,farClip):void
Sets a script camera's far clip distance.
Parameters
cam
number
The camera's handle.
farClip
number
The distance in metres.
Returns
void
Remarks
Partial: on a camera this client made (another number does nothing); not yet confirmed in the game.
Example
mp.game.cam.setFarClip(cam.handle, 1000);
setFov()
setFov(cam,fov):void
Sets the field of view of a script camera.
Parameters
cam
number
The camera's handle.
fov
number
The vertical field of view in degrees.
Returns
void
Remarks
RAGE MP's name for GameCamMp.setCamFov; it does exactly what that method does.
Example
mp.game.cam.setFov(cam, 40);
setGameplayCamShakeAmplitude()
setGameplayCamShakeAmplitude(amplitude):void
Sets how strongly the gameplay camera's current shake shakes.
Parameters
amplitude
number
The amplitude, a float.
Returns
void
Remarks
Partial: not yet confirmed in the game.
Example
mp.game.cam.setGameplayCamShakeAmplitude(0.5);
setGameplayShakeAmplitude()
setGameplayShakeAmplitude(amplitude):void
The same as setGameplayCamShakeAmplitude.
Parameters
amplitude
number
The amplitude, a float.
Returns
void
Remarks
Partial: not yet confirmed in the game.
Example
mp.game.cam.setGameplayShakeAmplitude(0.5);
setMotionBlurStrength()
setMotionBlurStrength(cam,strength):void
Sets how much a script camera's picture blurs when it moves.
Parameters
cam
number
The camera's handle.
strength
number
The strength, from 0.
Returns
void
Remarks
Partial: on a camera this client made (another number does nothing); not yet confirmed in the game.
Example
mp.game.cam.setMotionBlurStrength(cam.handle, 0.5);
setNearClip()
setNearClip(cam,nearClip):void
Sets a script camera's near clip distance.
Parameters
cam
number
The camera's handle.
nearClip
number
The distance in metres.
Returns
void
Remarks
Partial: on a camera this client made (another number does nothing); not yet confirmed in the game.
Example
mp.game.cam.setNearClip(cam.handle, 0.1);
setParams()
setParams(cam,posX,posY,posZ,rotX,rotY,rotZ,fieldOfView,p8,p9,p10,p11):void
Sets a script camera's position, rotation and field of view at once.
Parameters
cam
number
The camera's handle.
posX
number
The position's x.
posY
number
The position's y.
posZ
number
The position's z.
rotX
number
The pitch, degrees.
rotY
number
The roll, degrees.
rotZ
number
The yaw, degrees.
fieldOfView
number
Degrees.
p8
number
The duration, milliseconds.
p9
number
How the position eases.
p10
number
How the rotation eases.
p11
number
The rotation order.
Returns
void
Remarks
Partial: on a camera this client made (another number does nothing); not yet confirmed in the game.
Example
mp.game.cam.setParams(cam.handle, 0, 0, 80, -20, 0, 90, 50, 1000, 1, 1, 2);
setRot()
setRot(cam,x,y,z,rotationOrder?):void
Turns a script camera.
Parameters
cam
number
The camera's handle.
x
number
The pitch in degrees.
y
number
The roll in degrees.
z
number
The yaw in degrees.
rotationOrder?
number
Accepted for RAGE MP compatibility; ignored.
Returns
void
Remarks
RAGE MP's name for GameCamMp.setCamRot; it does exactly what that method does.
Example
mp.game.cam.setRot(cam, -20, 0, 90, 2);
shake()
shake(cam,type,amplitude):void
Shakes a script camera with a named shake.
Parameters
cam
number
The camera's handle.
type
string
The shake's name (or its hash).
amplitude
number
The strength, from 0.
Returns
void
Remarks
Partial: on a camera this client made (another number does nothing); not yet confirmed in the game.
Example
mp.game.cam.shake(cam.handle, '<shake name>', 0.5);
shakeCinematic()
shakeCinematic(p0,p1):void
The same as shakeCinematicCam.
Parameters
p0
string | number
The shake: its name (VI's own names), or its hash.
p1
number
How strongly it shakes, a float.
Returns
void
Remarks
Partial: not yet confirmed in the game.
Example
mp.game.cam.shakeCinematic('<shake name>', 1.0);
shakeCinematicCam()
shakeCinematicCam(p0,p1):void
Shakes the cinematic camera.
Parameters
p0
string | number
The shake: its name (VI's own names), or its hash.
p1
number
How strongly it shakes, a float.
Returns
void
Remarks
Partial: not yet confirmed in the game.
Example
mp.game.cam.shakeCinematicCam('<shake name>', 1.0);
shakeGameplay()
shakeGameplay(shakeName,intensity):void
The same as shakeGameplayCam.
Parameters
shakeName
string | number
The shake: its name (VI's own names), or its hash.
intensity
number
How strongly it shakes, a float.
Returns
void
Remarks
Partial: not yet confirmed in the game.
Example
mp.game.cam.shakeGameplay('<shake name>', 1.0);
shakeGameplayCam()
shakeGameplayCam(shakeName,intensity):void
Shakes the gameplay camera.
Parameters
shakeName
string | number
The shake: its name (VI's own names), or its hash.
intensity
number
How strongly it shakes, a float.
Returns
void
Remarks
Partial: not yet confirmed in the game.
Example
mp.game.cam.shakeGameplayCam('<shake name>', 1.0);
shakeScriptGlobal()
shakeScriptGlobal(p0,p1):void
Shakes every camera, the gameplay and the script ones, with a named shake.
Parameters
p0
string
The shake's name (or its hash).
p1
number
The strength, from 0.
Returns
void
Remarks
Partial: in this client's game only; through a game function that is likely, not certain, to be this one; not yet confirmed in the game.
Example
mp.game.cam.shakeScriptGlobal('<shake name>', 0.5);
stopCamPointing()
stopCamPointing(cam):void
Stops a script camera looking at a point or an entity.
Parameters
cam
number
The camera's handle.
Returns
void
Example
mp.game.cam.stopCamPointing(cam);
stopGameplayCamShaking()
stopGameplayCamShaking(p0):void
Stops the gameplay camera's shake.
Parameters
p0
boolean
A flag of the game, a bool (true stops at once).
Returns
void
Remarks
Partial: not yet confirmed in the game.
Example
mp.game.cam.stopGameplayCamShaking(true);
stopGameplayShaking()
stopGameplayShaking(p0):void
The same as stopGameplayCamShaking.
Parameters
p0
boolean
A flag of the game, a bool (true stops at once).
Returns
void
Remarks
Partial: not yet confirmed in the game.
Example
mp.game.cam.stopGameplayShaking(true);
stopPointing()
stopPointing(cam):void
Stops a script camera pointing at a target.
Parameters
cam
number
The camera's handle.
Returns
void
Remarks
RAGE MP's name for GameCamMp.stopCamPointing; it does exactly what that method does.
Example
mp.game.cam.stopPointing(cam);
stopScriptGlobalShaking()
stopScriptGlobalShaking(p0):void
Stops the shake that shakeScriptGlobal started.
Parameters
p0
boolean
True to stop at once, false to let it fade.
Returns
void
Remarks
Partial: in this client's game only; through a game function that is likely, not certain, to be this one; not yet confirmed in the game.
Example
mp.game.cam.stopScriptGlobalShaking(true);
stopShaking()
stopShaking(cam,p1):void
Stops a script camera's shake.
Parameters
cam
number
The camera's handle.
p1
boolean
True to stop at once.
Returns
void
Remarks
Partial: on a camera this client made (another number does nothing); not yet confirmed in the game.
Example
mp.game.cam.stopShaking(cam.handle, true);