Cam::getGameplayCamRot: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
p0 dosen't seem to change much, I tried it with 0, 1, 2:<br>0-Pitch(X): -70.000092<br>0-Roll(Y): -0.000001<br>0-Yaw(Z): -43.886459<br>1-Pitch(X): -70.000092<br>1-Roll(Y): -0.000001<br>1-Yaw(Z): -43.886463<br>2-Pitch(X): -70.000092<br>2-Roll(Y): -0.000002<br>2-Yaw(Z): -43.886467
p0 dosen't seem to change much, I tried it with 0, 1, 2:<br>
0-Pitch(X): -70.000092<br>
0-Roll(Y): -0.000001<br>
0-Yaw(Z): -43.886459<br>
1-Pitch(X): -70.000092<br>
1-Roll(Y): -0.000001<br>
1-Yaw(Z): -43.886463<br>
2-Pitch(X): -70.000092<br>
2-Roll(Y): -0.000002<br>
2-Yaw(Z): -43.886467
==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">cam.getGameplayCamRot(p0);</syntaxhighlight>
<syntaxhighlight lang="javascript">
mp.game.cam.getGameplayCamRot(p0);
</syntaxhighlight>
=== Required Arguments ===
=== Required Arguments ===
*'''p0:''' int
*'''p0:''' int
Line 8: Line 19:
==Example==
==Example==
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
todo
//Store the values:
var cam_rot = mp.game.cam.getGameplayCamRot(0);
</syntaxhighlight>
</syntaxhighlight>
The X component is stored as <syntaxhighlight lang="javascript">cam_rot.x</syntaxhighlight>
Same for Y and Z (keep in mind that when we get a component from a Vector3 we use small letters)
==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 08:08, 1 January 2020

p0 dosen't seem to change much, I tried it with 0, 1, 2:
0-Pitch(X): -70.000092
0-Roll(Y): -0.000001
0-Yaw(Z): -43.886459
1-Pitch(X): -70.000092
1-Roll(Y): -0.000001
1-Yaw(Z): -43.886463
2-Pitch(X): -70.000092
2-Roll(Y): -0.000002
2-Yaw(Z): -43.886467

Syntax

mp.game.cam.getGameplayCamRot(p0);

Required Arguments

  • p0: int

Return value

  • Vector3

Example

//Store the values:
var cam_rot = mp.game.cam.getGameplayCamRot(0);

The X component is stored as

cam_rot.x

Same for Y and Z (keep in mind that when we get a component from a Vector3 we use small letters)

See also

Template:Cam s function c