Camera::destroy: Difference between revisions

From RAGE Multiplayer Wiki
mNo edit summary
 
(One intermediate revision by the same user not shown)
Line 7: Line 7:
*'''Undefined'''
*'''Undefined'''
==Example==
==Example==
This example creates a camera and then destroys it.
<pre>
<pre>
// todo
let camera = mp.cameras.new('default', new mp.Vector3(-485, 1095.75, 323.85), new mp.Vector3(0,0,0), 40); // Creates the camera
camera.setActive(true);
 
// After 5 seconds destroys the camera.
setTimeout(function (){
  camera.destroy();
}, 5000)
</pre>
</pre>
==See also==
==See also==
{{Camera_definition_c}}
{{Camera_definition_c}}

Latest revision as of 23:27, 11 December 2020

Removes the camera.

Syntax

camera.destroy(destroy);

Required Arguments

  • destroy: Boolean

Return value

  • Undefined

Example

This example creates a camera and then destroys it.

let camera = mp.cameras.new('default', new mp.Vector3(-485, 1095.75, 323.85), new mp.Vector3(0,0,0), 40); // Creates the camera
camera.setActive(true);

// After 5 seconds destroys the camera.
setTimeout(function (){
  camera.destroy();
}, 5000)

See also