Cam::animateGameplayCamZoom: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
(yay)
 
Line 1: Line 1:
Seems to animate the gameplay camera zoom.<br><br>Eg. _ANIMATE_GAMEPLAY_CAM_ZOOM(1f, 1000f);<br>will animate the camera zooming in from 1000 meters away.<br><br>Game scripts use it like this:<br><br>// Setting this to 1 prevents V key from changing zoom<br>PLAYER::SET_PLAYER_FORCED_ZOOM(PLAYER::PLAYER_ID(), 1);<br><br>// These restrict how far you can move cam up/down left/right<br>CAM::_CLAMP_GAMEPLAY_CAM_YAW(-20f, 50f);<br>CAM::_CLAMP_GAMEPLAY_CAM_PITCH(-60f, 0f);<br><br>CAM::_ANIMATE_GAMEPLAY_CAM_ZOOM(1f, 1f);
Seems to animate the gameplay camera zoom.<br><br>Eg. _ANIMATE_GAMEPLAY_CAM_ZOOM(1f, 1000f);<br>will animate the camera zooming in from 1000 meters away.<br><br>Game scripts use it like this:<br><br>// Setting this to 1 prevents V key from changing zoom<br>PLAYER::SET_PLAYER_FORCED_ZOOM(PLAYER::PLAYER_ID(), 1);<br><br>// These restrict how far you can move cam up/down left/right<br>CAM::_CLAMP_GAMEPLAY_CAM_YAW(-20f, 50f);<br>CAM::_CLAMP_GAMEPLAY_CAM_PITCH(-60f, 0f);<br><br>CAM::_ANIMATE_GAMEPLAY_CAM_ZOOM(1f, 1f);
==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">cam.animateGameplayCamZoom(p0, distance);</syntaxhighlight>
<syntaxhighlight lang="javascript">mp.game.cam.animateGameplayCamZoom(p0, distance);</syntaxhighlight>
=== Required Arguments ===
=== Required Arguments ===
*'''p0:''' float
*'''p0:''' float
Line 9: Line 9:
==Example==
==Example==
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
todo
// todo
</syntaxhighlight>
</syntaxhighlight>
==See also==
==See also==
{{Cam_function_c}}
{{Cam_s_function_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]
[[Category:TODO: Example]]

Latest revision as of 21:05, 6 May 2017

Seems to animate the gameplay camera zoom.

Eg. _ANIMATE_GAMEPLAY_CAM_ZOOM(1f, 1000f);
will animate the camera zooming in from 1000 meters away.

Game scripts use it like this:

// Setting this to 1 prevents V key from changing zoom
PLAYER::SET_PLAYER_FORCED_ZOOM(PLAYER::PLAYER_ID(), 1);

// These restrict how far you can move cam up/down left/right
CAM::_CLAMP_GAMEPLAY_CAM_YAW(-20f, 50f);
CAM::_CLAMP_GAMEPLAY_CAM_PITCH(-60f, 0f);

CAM::_ANIMATE_GAMEPLAY_CAM_ZOOM(1f, 1f);

Syntax

mp.game.cam.animateGameplayCamZoom(p0, distance);

Required Arguments

  • p0: float
  • distance: float

Return value

  • Undefined

Example

// todo

See also

Template:Cam s function c