Class BasicCameraController
- Namespace
- LibreRally
- Assembly
- LibreRally.dll
A script that allows to move and rotate an entity through keyboard, mouse and touch input to provide basic camera navigation.
public class BasicCameraController : SyncScript, IIdentifiable, ICollectorHolder
- Inheritance
-
SyncScriptBasicCameraController
- Implements
-
IIdentifiableICollectorHolder
- Inherited Members
Remarks
The entity can be moved using W, A, S, D, Q and E, arrow keys, a gamepad's left stick or dragging/scaling using multi-touch. Rotation is achieved using the Numpad, the mouse while holding the right mouse button, a gamepad's right stick, or dragging using single-touch.
Properties
Gamepad
Gets or sets a value indicating whether gamepad input is enabled for this camera.
public bool Gamepad { get; set; }
Property Value
KeyboardMovementSpeed
Gets or sets the base movement speed when using the keyboard.
public Vector3 KeyboardMovementSpeed { get; set; }
Property Value
KeyboardRotationSpeed
Gets or sets the base rotation speed when using the keyboard.
public Vector2 KeyboardRotationSpeed { get; set; }
Property Value
MouseRotationSpeed
Gets or sets the base rotation speed when using the mouse.
public Vector2 MouseRotationSpeed { get; set; }
Property Value
SpeedFactor
Gets or sets the multiplier applied to movement speed when the speed boost modifier is active.
public float SpeedFactor { get; set; }
Property Value
TouchMovementSpeed
Gets or sets the base movement speed when using touch input.
public Vector3 TouchMovementSpeed { get; set; }
Property Value
TouchRotationSpeed
Gets or sets the base rotation speed when using touch input.
public Vector2 TouchRotationSpeed { get; set; }
Property Value
Methods
Start()
Initializes the camera controller state and touch gestures.
public override void Start()
Update()
Processes player input and updates the camera transform for the current frame.
public override void Update()