Camera::setActive: Difference between revisions

From RAGE Multiplayer Wiki
(Test 2)
m (Replaced HTML with template)
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
__NOTOC__
==Description==
__NOTITLE__
Set camera as active/inactive.
{{Clientside_API}}


Set camera as active/inactive.
==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">camera.setActive(active);</syntaxhighlight>
<pre>camera.setActive(active);</pre>
 
=== Required Arguments ===
=== Required Arguments ===
*'''active:''' Boolean
*'''active:''' Boolean
===Return value===
===Return value===
*'''Undefined'''
*'''Undefined'''
==Example==
==Example==
<syntaxhighlight lang="javascript">
Creates a camera with the stated positions and rendering it.
// todo
 
</syntaxhighlight>
{{ClientsideCode|
<pre>
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);
</pre>
}}
 
==See also==
==See also==
{{Camera_function_c}}
{{Camera_definition_c}}
[[Category:TODO: Example]]
[[Category:Clientside API]]

Latest revision as of 13:16, 26 October 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