Class Camera
Represents the player's camera view.
Inherited Members
Namespace: SlipeServer.Server.Concepts
Assembly: SlipeServer.Server.dll
Syntax
public class Camera
Constructors
| Edit this page View SourceCamera(Player)
Declaration
public Camera(Player player)
Parameters
Type | Name | Description |
---|---|---|
Player | player |
Properties
| Edit this page View SourceInterior
The interior the camera is rendering content of
Declaration
public byte Interior { get; set; }
Property Value
Type | Description |
---|---|
byte |
LookAt
The position the camera is looking at, use SetMatrix if you want to modify this for the client
Declaration
public Vector3? LookAt { get; set; }
Property Value
Type | Description |
---|---|
Vector3? |
Position
The camera's position, use SetMatrix if you want to modify this for the client
Declaration
public Vector3? Position { get; set; }
Property Value
Type | Description |
---|---|
Vector3? |
Target
The camera target, when set the camera follows this element. This only supports vehicles and players
Declaration
public Element? Target { get; set; }
Property Value
Type | Description |
---|---|
Element |
Methods
| Edit this page View SourceFade(CameraFade, float, Color?)
Fades the camera in or out
Declaration
public void Fade(CameraFade fade, float fadeTime = 1, Color? color = null)
Parameters
Type | Name | Description |
---|---|---|
CameraFade | fade | Determines whether to fade in or out |
float | fadeTime | Time the fade should take in seconds |
Color? | color | color to fade (out) to |
SetMatrix(Vector3, Vector3, float, float)
Sets the camera's position, direction, roll and field of view
Declaration
public void SetMatrix(Vector3 position, Vector3 lookAt, float roll = 0, float fov = 70)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | position | Position of the camera |
Vector3 | lookAt | Position the camera looks at |
float | roll | Camera roll, in degrees |
float | fov | Camera field of view, in degrees |