Camera::setActive: Difference between revisions

From RAGE Multiplayer Wiki
mNo edit summary
mNo edit summary
Line 15: Line 15:
Creates a camera with the stated positions and rendering it.
Creates a camera with the stated positions and rendering it.


<div class="header" style="background-color: #AE4040; color: #FFFFFF; border: 2px solid #AE4040;">
<div style="margin: 10px 10px 10px 10px;"><b>Client-Side</b></div>
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
let cam = mp.cameras.new('default', new mp.Vector3(0,0,0), new mp.Vector3(0,0,0), false);
let cam = mp.cameras.new('default', new mp.Vector3(0,0,0), new mp.Vector3(0,0,0), false);
Line 20: Line 22:
mp.game.cam.renderScriptCams(true, false, 0, true, false);
mp.game.cam.renderScriptCams(true, false, 0, true, false);
</syntaxhighlight>
</syntaxhighlight>
</div>
==See also==
==See also==
{{Camera_definition_c}}
{{Camera_definition_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]

Revision as of 22:56, 15 June 2018

Description

Set camera as active/inactive.

Syntax

camera.setActive(active);

Required Arguments

  • active: Boolean

Return value

  • Undefined

Example

Creates a camera with the stated positions and rendering it.

Client-Side
let cam = mp.cameras.new('default', new mp.Vector3(0,0,0), new mp.Vector3(0,0,0), false);
cam.setActive(true);
mp.game.cam.renderScriptCams(true, false, 0, true, false);

See also