Class GameplayCamera
Inherited Members
Namespace: GTA
Assembly: ScriptHookVDotNet3.dll
Syntax
public static class GameplayCamera
Properties
| Improve this Doc View SourceDirection
Gets the direction the GameplayCamera is pointing in.
Declaration
public static Vector3 Direction { get; }
Property Value
Type | Description |
---|---|
Vector3 |
FieldOfView
Gets the field of view of the GameplayCamera.
Declaration
public static float FieldOfView { get; }
Property Value
Type | Description |
---|---|
Single |
ForwardVector
Gets the forward vector of the GameplayCamera, see also Direction.
Declaration
public static Vector3 ForwardVector { get; }
Property Value
Type | Description |
---|---|
Vector3 |
IsAimCamActive
Gets a value indicating whether the aiming camera is rendering.
Declaration
public static bool IsAimCamActive { get; }
Property Value
Type | Description |
---|---|
Boolean | true if the aiming camera is rendering; otherwise, false. |
IsFirstPersonAimCamActive
Gets a value indicating whether the first person aiming camera is rendering.
Declaration
public static bool IsFirstPersonAimCamActive { get; }
Property Value
Type | Description |
---|---|
Boolean | true if the aiming camera is rendering; otherwise, false. |
IsLookingBehind
Gets a value indicating whether the GameplayCamera is looking behind.
Declaration
public static bool IsLookingBehind { get; }
Property Value
Type | Description |
---|---|
Boolean | true if the GameplayCamera is looking behind; otherwise, false. |
IsRendering
Gets a value indicating whether the GameplayCamera is rendering.
Declaration
public static bool IsRendering { get; }
Property Value
Type | Description |
---|---|
Boolean | true if the GameplayCamera is rendering; otherwise, false. |
IsShaking
Gets a value indicating whether the GameplayCamera is shaking.
Declaration
public static bool IsShaking { get; }
Property Value
Type | Description |
---|---|
Boolean | true if the GameplayCamera is shaking; otherwise, false. |
Matrix
Gets the matrix of the GameplayCamera.
Declaration
public static Matrix Matrix { get; }
Property Value
Type | Description |
---|---|
Matrix |
MemoryAddress
Gets the memory address of the GameplayCamera.
Declaration
public static IntPtr MemoryAddress { get; }
Property Value
Type | Description |
---|---|
IntPtr |
Position
Gets the position of the GameplayCamera.
Declaration
public static Vector3 Position { get; }
Property Value
Type | Description |
---|---|
Vector3 |
RelativeHeading
Gets or sets the relative heading of the GameplayCamera.
Declaration
public static float RelativeHeading { get; set; }
Property Value
Type | Description |
---|---|
Single |
RelativePitch
Gets or sets the relative pitch of the GameplayCamera.
Declaration
public static float RelativePitch { get; set; }
Property Value
Type | Description |
---|---|
Single |
RightVector
Gets the right vector of the GameplayCamera.
Declaration
public static Vector3 RightVector { get; }
Property Value
Type | Description |
---|---|
Vector3 |
Rotation
Gets the rotation of the GameplayCamera.
Declaration
public static Vector3 Rotation { get; }
Property Value
Type | Description |
---|---|
Vector3 | The yaw, pitch and roll rotations measured in degrees. |
ShakeAmplitude
Sets the shake amplitude for the GameplayCamera.
Declaration
public static float ShakeAmplitude { set; }
Property Value
Type | Description |
---|---|
Single |
UpVector
Gets the up vector of the GameplayCamera.
Declaration
public static Vector3 UpVector { get; }
Property Value
Type | Description |
---|---|
Vector3 |
Zoom
Gets the zoom of the GameplayCamera.
Declaration
public static float Zoom { get; }
Property Value
Type | Description |
---|---|
Single |
Methods
| Improve this Doc View SourceClampPitch(Single, Single)
Clamps the pitch of the GameplayCamera.
Declaration
public static void ClampPitch(float min, float max)
Parameters
Type | Name | Description |
---|---|---|
Single | min | The minimum pitch value. |
Single | max | The maximum pitch value. |
ClampYaw(Single, Single)
Clamps the yaw of the GameplayCamera.
Declaration
public static void ClampYaw(float min, float max)
Parameters
Type | Name | Description |
---|---|---|
Single | min | The minimum yaw value. |
Single | max | The maximum yaw value. |
GetOffsetPosition(Vector3)
Gets the position in world coordinates of an offset relative to the GameplayCamera.
Declaration
public static Vector3 GetOffsetPosition(Vector3 offset)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | offset | The offset from the GameplayCamera. |
Returns
Type | Description |
---|---|
Vector3 |
GetPositionOffset(Vector3)
Gets the relative offset of the GameplayCamera from a world coordinates position.
Declaration
public static Vector3 GetPositionOffset(Vector3 worldCoords)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | worldCoords | The world coordinates. |
Returns
Type | Description |
---|---|
Vector3 |
Shake(CameraShake, Single)
Shakes the GameplayCamera.
Declaration
public static void Shake(CameraShake shakeType, float amplitude)
Parameters
Type | Name | Description |
---|---|---|
CameraShake | shakeType | Type of the shake to apply. |
Single | amplitude | The amplitude of the shaking. |
StopShaking()
Stops shaking the GameplayCamera.
Declaration
public static void StopShaking()