RAGE.Game.Cam.SetCamActiveWithInterp: Difference between revisions

From RAGE Multiplayer Wiki
(Created page with "==Syntax== <pre>RAGE.Game.Cam.SetCamActiveWithInterp(int cameraTo, int cameraFrom , int delayInMs, int easeLocation, int easeRotation)</pre> ==Example== === Required Argume...")
 
m (removed extra code)
 
Line 21: Line 21:
{
{
     int cameraTo = RAGE.Game.Cam.CreateCamWithParams("DEFAULT_SCRIPTED_CAMERA", targetX, targetY, targetZ + 2350f, rotX, rotY, rotZ, 2, false, 0);
     int cameraTo = RAGE.Game.Cam.CreateCamWithParams("DEFAULT_SCRIPTED_CAMERA", targetX, targetY, targetZ + 2350f, rotX, rotY, rotZ, 2, false, 0);
    RAGE.Game.Cam.SetCamFov(cameraTo, 5.0f);
     RAGE.Game.Cam.SetCamActive(cameraTo, true);
     RAGE.Game.Cam.SetCamActive(cameraTo, true);
     RAGE.Game.Cam.SetCamFov(cameraTo, 5.0f);
     RAGE.Game.Cam.SetCamFov(cameraTo, 5.0f);
Line 30: Line 29:
</syntaxhighlight>
</syntaxhighlight>
}}
}}


==See also==
==See also==
{{Gui_definition_c}}
{{Gui_definition_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]

Latest revision as of 07:48, 29 January 2020

Syntax

RAGE.Game.Cam.SetCamActiveWithInterp(int cameraTo, int cameraFrom , int delayInMs, int easeLocation, int easeRotation)

Example

Required Arguments

  • cameraTo: int cameraTo
  • delayInMs: int delayInMs
  • easeLocation: int easeLocation
  • easeRotation: int easeRotation

Example

C# Syntax

Parameters

  • toggle: Bool toggle

Example

public void activateChat(bool toggle)
{
    int cameraTo = RAGE.Game.Cam.CreateCamWithParams("DEFAULT_SCRIPTED_CAMERA", targetX, targetY, targetZ + 2350f, rotX, rotY, rotZ, 2, false, 0);
    RAGE.Game.Cam.SetCamActive(cameraTo, true);
    RAGE.Game.Cam.SetCamFov(cameraTo, 5.0f);
    RAGE.Game.Cam.PointCamAtEntity(cameraTo, player.Handle, 0f, 0f, 0f, true);

    RAGE.Game.Cam.SetCamActiveWithInterp(cameraTo, camera, 1500, 4, 1);
}


See also