Camera::setActiveWithInterp: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
 
No edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Previous declaration void SET_Camera_ACTIVE_WITH_INTERP(Cam camTo, Cam camFrom, int duration, BOOL easeLocation, BOOL easeRotation) is completely wrong. The last two params are integers not BOOLs...<br>
==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">camera.setActiveWithInterp(camFrom, duration, easeLocation, easeRotation);</syntaxhighlight>
<syntaxhighlight lang="javascript">camera.setActiveWithInterp(camFrom, duration, easeLocation, easeRotation);</syntaxhighlight>
=== Required Arguments ===
=== Required Arguments ===
*'''camFrom:''' Cam
*'''camFrom:''' Camera.Handle
*'''duration:''' int
*'''duration:''' int
*'''easeLocation:''' int
*'''easeLocation:''' int
*'''easeRotation:''' int
*'''easeRotation:''' int
===Return value===
===Return value===
*'''Undefined'''
*'''Undefined'''
==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==
{{Camera_function_c}}
{{Camera_definition_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]
[[Category:TODO: Example]]

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