Class Camera
Inherited Members
Namespace: GTA
Assembly: ScriptHookVDotNet3.dll
Syntax
public sealed class Camera : PoolObject, INativeValue, IDeletable, IExistable, ISpatial
Constructors
| Improve this Doc View SourceCamera(Int32)
Declaration
public Camera(int handle)
Parameters
Type | Name | Description |
---|---|---|
Int32 | handle |
Properties
| Improve this Doc View SourceDepthOfFieldStrength
Sets the depth of field strength for this Camera.
Declaration
public float DepthOfFieldStrength { set; }
Property Value
Type | Description |
---|---|
Single |
Direction
Gets or sets the direction this Camera is pointing in.
Declaration
public Vector3 Direction { get; set; }
Property Value
Type | Description |
---|---|
Vector3 |
FarClip
Gets or sets the far clip of this Camera.
Declaration
public float FarClip { get; set; }
Property Value
Type | Description |
---|---|
Single |
FarDepthOfField
Gets or sets the far depth of field of this Camera.
Declaration
public float FarDepthOfField { get; set; }
Property Value
Type | Description |
---|---|
Single |
FieldOfView
Gets or sets the field of view of this Camera.
Declaration
public float FieldOfView { get; set; }
Property Value
Type | Description |
---|---|
Single |
ForwardVector
Declaration
public Vector3 ForwardVector { get; }
Property Value
Type | Description |
---|---|
Vector3 |
IsActive
Gets or sets a value indicating whether this Camera is currently being rendered.
Declaration
public bool IsActive { get; set; }
Property Value
Type | Description |
---|---|
Boolean | true if this Camera is active; otherwise, false. |
IsInterpolating
Gets a value indicating whether this Camera is interpolating.
Declaration
public bool IsInterpolating { get; }
Property Value
Type | Description |
---|---|
Boolean | true if this Camera is interpolating; otherwise, false. |
IsShaking
Gets a value indicating whether this Camera is shaking.
Declaration
public bool IsShaking { get; }
Property Value
Type | Description |
---|---|
Boolean | true if this Camera is shaking; otherwise, false. |
Matrix
Gets the matrix of this Camera.
Declaration
public Matrix Matrix { get; }
Property Value
Type | Description |
---|---|
Matrix |
MemoryAddress
Gets the memory address of this Camera.
Declaration
public IntPtr MemoryAddress { get; }
Property Value
Type | Description |
---|---|
IntPtr |
MotionBlurStrength
Sets the strength of the motion blur for this Camera
Declaration
public float MotionBlurStrength { set; }
Property Value
Type | Description |
---|---|
Single |
NearClip
Gets or sets the near clip of this Camera.
Declaration
public float NearClip { get; set; }
Property Value
Type | Description |
---|---|
Single |
NearDepthOfField
Sets the near depth of field for this Camera.
Declaration
public float NearDepthOfField { set; }
Property Value
Type | Description |
---|---|
Single |
Position
Gets or sets the position of this Camera.
Declaration
public Vector3 Position { get; set; }
Property Value
Type | Description |
---|---|
Vector3 |
RightVector
Gets the right vector of this Camera.
Declaration
public Vector3 RightVector { get; }
Property Value
Type | Description |
---|---|
Vector3 |
Rotation
Gets or sets the rotation of this Camera.
Declaration
public Vector3 Rotation { get; set; }
Property Value
Type | Description |
---|---|
Vector3 | The yaw, pitch and roll rotations measured in degrees. |
ShakeAmplitude
Sets the shake amplitude for this Camera.
Declaration
public float ShakeAmplitude { set; }
Property Value
Type | Description |
---|---|
Single |
UpVector
Gets the up vector of this Camera.
Declaration
public Vector3 UpVector { get; }
Property Value
Type | Description |
---|---|
Vector3 |
Methods
| Improve this Doc View SourceAttachTo(Entity, Vector3)
Declaration
public void AttachTo(Entity entity, Vector3 offset)
Parameters
Type | Name | Description |
---|---|---|
Entity | entity | The Entity to attach to. |
Vector3 | offset | The offset from the |
AttachTo(PedBone, Vector3)
Declaration
public void AttachTo(PedBone pedBone, Vector3 offset)
Parameters
Type | Name | Description |
---|---|---|
PedBone | pedBone | The PedBone to attach to. |
Vector3 | offset | The offset from the |
Delete()
Destroys this Camera.
Declaration
public override void Delete()
Overrides
| Improve this Doc View SourceDetach()
Declaration
public void Detach()
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj | The Object to check. |
Returns
Type | Description |
---|---|
Boolean | true if the |
Overrides
| Improve this Doc View SourceExists()
Determines if this Camera exists.
Declaration
public override bool Exists()
Returns
Type | Description |
---|---|
Boolean | true if this Camera exists; otherwise, false. |
Overrides
| Improve this Doc View SourceGetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 |
Overrides
| Improve this Doc View SourceGetOffsetPosition(Vector3)
Gets the position in world coordinates of an offset relative to this Camera
Declaration
public Vector3 GetOffsetPosition(Vector3 offset)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | offset | The offset from this Camera. |
Returns
Type | Description |
---|---|
Vector3 |
GetPositionOffset(Vector3)
Gets the relative offset of this Camera from a world coordinates position
Declaration
public Vector3 GetPositionOffset(Vector3 worldCoords)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | worldCoords | The world coordinates. |
Returns
Type | Description |
---|---|
Vector3 |
InterpTo(Camera, Int32, Int32, Int32)
Moves this Camera to the to
position.
Declaration
public void InterpTo(Camera to, int duration, int easePosition, int easeRotation)
Parameters
Type | Name | Description |
---|---|---|
Camera | to | |
Int32 | duration | |
Int32 | easePosition | |
Int32 | easeRotation |
PointAt(Entity, Vector3)
Declaration
public void PointAt(Entity target, Vector3 offset = default(Vector3))
Parameters
Type | Name | Description |
---|---|---|
Entity | target | The Entity to point at. |
Vector3 | offset | The offset from the |
PointAt(Vector3)
Points this Camera at a specified position.
Declaration
public void PointAt(Vector3 target)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | target | The position to point at. |
PointAt(PedBone, Vector3)
Declaration
public void PointAt(PedBone target, Vector3 offset = default(Vector3))
Parameters
Type | Name | Description |
---|---|---|
PedBone | target | The PedBone to point at. |
Vector3 | offset | The offset from the |
Shake(CameraShake, Single)
Shakes this Camera.
Declaration
public 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. |
StopPointing()
Stops this Camera pointing at a specific target.
Declaration
public void StopPointing()
StopShaking()
Stops shaking this Camera.
Declaration
public void StopShaking()
Operators
| Improve this Doc View SourceEquality(Camera, Camera)
Determines if two Cameras refer to the same camera.
Declaration
public static bool operator ==(Camera left, Camera right)
Parameters
Type | Name | Description |
---|---|---|
Camera | left | The left Camera. |
Camera | right | The right Camera. |
Returns
Type | Description |
---|---|
Boolean | true if |
Implicit(Camera to InputArgument)
Converts a Camera to a native input argument.
Declaration
public static implicit operator InputArgument(Camera value)
Parameters
Type | Name | Description |
---|---|---|
Camera | value |
Returns
Type | Description |
---|---|
InputArgument |
Inequality(Camera, Camera)
Determines if two Checkpoints don't refer to the same camera.
Declaration
public static bool operator !=(Camera left, Camera right)
Parameters
Type | Name | Description |
---|---|---|
Camera | left | The left Camera. |
Camera | right | The right Camera. |
Returns
Type | Description |
---|---|
Boolean | true if |