Camera::setActive: Difference between revisions

From RAGE Multiplayer Wiki
(Plugin NoTile does not work. Removed)
No edit summary
Line 1: Line 1:
__NOTOC__
==Description==
Set camera as active/inactive.
Set camera as active/inactive.
==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">camera.setActive(active);</syntaxhighlight>
<syntaxhighlight lang="javascript">camera.setActive(active);</syntaxhighlight>
=== Required Arguments ===
=== Required Arguments ===
*'''active:''' Boolean
*'''active:''' Boolean
===Return value===
===Return value===
*'''Undefined'''
*'''Undefined'''
==Example==
==Example==
Creates a camera with the stated positions and rendering it.
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
// todo
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);
</syntaxhighlight>
</syntaxhighlight>
==See also==
==See also==
{{Camera_function_c}}
{{Camera_function_c}}
[[Category:TODO: Example]]

Revision as of 17:07, 2 October 2017

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.

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