Camera::setActiveWithInterp: Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
No edit summary
 
Line 11: Line 11:
==Example==
==Example==
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
// todo
var camera1 = mp.cameras.new('default', new mp.Vector3(111.1, 222.2, 12.37), new mp.Vector3(0, 0, 0), 40);
var camera2 = mp.cameras.new('default', new mp.Vector3(222.2, 333.3, 1.37), new mp.Vector3(0, 0, 0), 40);
camera2.setActiveWithInterp(camera1.handle, 2000, 0, 0); // 2000ms = 2secs, 0, 0 - idk
</syntaxhighlight>
</syntaxhighlight>
==See also==
==See also==

Latest revision as of 17:12, 27 July 2018

Syntax

camera.setActiveWithInterp(camFrom, duration, easeLocation, easeRotation);

Required Arguments

  • camFrom: Camera.Handle
  • duration: int
  • easeLocation: int
  • easeRotation: int

Return value

  • Undefined

Example

var camera1 = mp.cameras.new('default', new mp.Vector3(111.1, 222.2, 12.37), new mp.Vector3(0, 0, 0), 40);
var camera2 = mp.cameras.new('default', new mp.Vector3(222.2, 333.3, 1.37), new mp.Vector3(0, 0, 0), 40);
camera2.setActiveWithInterp(camera1.handle, 2000, 0, 0); // 2000ms = 2secs, 0, 0 - idk

See also