Show / Hide Table of Contents

Class Camera

Class representing the camera of the local player

Inheritance
Object
Camera
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: Slipe.Client
Assembly: SlipeClient.dll
Syntax
public class Camera

Constructors

| Improve this Doc View Source

Camera()

Declaration
public Camera()

Properties

| Improve this Doc View Source

Instance

Declaration
public static Camera Instance { get; }
Property Value
Type Description
Camera
| Improve this Doc View Source

Interior

Get and set the interior the camera is in

Declaration
public int Interior { get; set; }
Property Value
Type Description
Int32
| Improve this Doc View Source

NearClipDistance

This property sets the distance from the camera at which the world starts rendering.

Declaration
public float NearClipDistance { get; set; }
Property Value
Type Description
Single
| Improve this Doc View Source

ShakeLevel

Get and set the shake level of the camera

Declaration
public byte ShakeLevel { get; set; }
Property Value
Type Description
Byte
| Improve this Doc View Source

Target

Get and set the target of the camera

Declaration
public PhysicalElement Target { get; set; }
Property Value
Type Description
PhysicalElement
| Improve this Doc View Source

ViewMode

Get and set the viewmode of the camera

Declaration
public CameraViewMode ViewMode { get; set; }
Property Value
Type Description
CameraViewMode

Methods

| Improve this Doc View Source

Fade(CameraFade)

Fade to Black \m/

Declaration
public bool Fade(CameraFade fade)
Parameters
Type Name Description
CameraFade fade
Returns
Type Description
Boolean
| Improve this Doc View Source

Fade(CameraFade, Color, Int32)

Fade the camera to a color in a specific time

Declaration
public bool Fade(CameraFade fade, Color color, int time = 1000)
Parameters
Type Name Description
CameraFade fade
Color color
Int32 time
Returns
Type Description
Boolean
| Improve this Doc View Source

GetCameraClip()

Get the clip settings of the camera

Declaration
public Tuple<bool, bool> GetCameraClip()
Returns
Type Description
Tuple<Boolean, Boolean>
| Improve this Doc View Source

GetCameraMatrix()

Retrieve the camera matrix as a matrix4x4 representation

Declaration
public Matrix4x4 GetCameraMatrix()
Returns
Type Description
Matrix4x4
| Improve this Doc View Source

GetFieldOfView(CameraMode)

Get the field of view of a specific mode of the camera

Declaration
public float GetFieldOfView(CameraMode mode)
Parameters
Type Name Description
CameraMode mode
Returns
Type Description
Single
| Improve this Doc View Source

GetFullCameraMatrix()

Retrieve the full camera matrix

Declaration
public Tuple<Vector3, Vector3, float, float> GetFullCameraMatrix()
Returns
Type Description
Tuple<Vector3, Vector3, Single, Single>
| Improve this Doc View Source

GetGoggleEffect()

Get the Goggleeffect of this camera

Declaration
public string GetGoggleEffect()
Returns
Type Description
String
| Improve this Doc View Source

GetScreenFromWorldPosition(Vector3, Single, Boolean)

This function gets the screen position of a point in the world.

Declaration
public Vector2 GetScreenFromWorldPosition(Vector3 position, float edgeTolerance = 0F, bool relative = true)
Parameters
Type Name Description
Vector3 position
Single edgeTolerance
Boolean relative
Returns
Type Description
Vector2
| Improve this Doc View Source

GetWorldFromScreenPosition(Vector2, Single)

This function allows you to retrieve the world position corresponding to a 2D position on the screen, at a certain depth.

Declaration
public Vector3 GetWorldFromScreenPosition(Vector2 position, float depth)
Parameters
Type Name Description
Vector2 position
Single depth
Returns
Type Description
Vector3
| Improve this Doc View Source

IsLineOfSightClear(Vector3, Vector3, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, PhysicalElement)

This function checks if there are obstacles between two points of the game world, optionally ignoring certain kinds of elements. Use processLineOfSight if you want more information about what the ray hits.

Declaration
public bool IsLineOfSightClear(Vector3 start, Vector3 end, bool checkBuildings = true, bool checkVehicles = true, bool checkPeds = true, bool checkObjects = true, bool checkDummies = true, bool seeThroughStuff = false, bool ignoreSomeObjectsForCamera = false, PhysicalElement ignoredElement = null)
Parameters
Type Name Description
Vector3 start
Vector3 end
Boolean checkBuildings
Boolean checkVehicles
Boolean checkPeds
Boolean checkObjects
Boolean checkDummies
Boolean seeThroughStuff
Boolean ignoreSomeObjectsForCamera
PhysicalElement ignoredElement
Returns
Type Description
Boolean
| Improve this Doc View Source

SetCameraClip(Boolean, Boolean)

Set if this camera clips with objects and/or vehicles

Declaration
public bool SetCameraClip(bool objects = true, bool vehicles = true)
Parameters
Type Name Description
Boolean objects
Boolean vehicles
Returns
Type Description
Boolean
| Improve this Doc View Source

SetFieldOfView(CameraMode, Single)

Set the field of view of this camera on a specific mode

Declaration
public bool SetFieldOfView(CameraMode mode, float fieldOfView)
Parameters
Type Name Description
CameraMode mode
Single fieldOfView
Returns
Type Description
Boolean
| Improve this Doc View Source

SetGoggleEffect(GoggleEffects, Boolean)

Set the goggle effect of this camera

Declaration
public bool SetGoggleEffect(GoggleEffects effect, bool noiseEnabled = true)
Parameters
Type Name Description
GoggleEffects effect
Boolean noiseEnabled
Returns
Type Description
Boolean
| Improve this Doc View Source

SetMatrix(Matrix4x4, Single, Single)

Get and set the 4x4matrix, roll and field of view on the camera

Declaration
public bool SetMatrix(Matrix4x4 matrix, float roll = 0F, float fov = 70F)
Parameters
Type Name Description
Matrix4x4 matrix
Single roll
Single fov
Returns
Type Description
Boolean
| Improve this Doc View Source

SetMatrix(Vector3, Vector3, Single, Single)

Get and set the matrix, roll and fox using vector3s for position and lookAt

Declaration
public bool SetMatrix(Vector3 position, Vector3 lookAt, float roll = 0F, float fov = 70F)
Parameters
Type Name Description
Vector3 position
Vector3 lookAt
Single roll
Single fov
Returns
Type Description
Boolean
  • Improve this Doc
  • View Source
Back to top Generated by DocFX