Class Basic3DCameraController
- Namespace
- Stride.CommunityToolkit.Scripts
- Assembly
- Stride.CommunityToolkit.dll
A script that allows to move and rotate an entity through keyboard, mouse and touch input to provide basic camera navigation.
public class Basic3DCameraController : SyncScript, IIdentifiable, ICollectorHolder
- Inheritance
-
Basic3DCameraController
- Implements
- Inherited Members
- Extension Methods
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.
This functionality is inspired by Stride.Assets.Presentation, Assets->Scripts->Camera
Properties
Gamepad
public bool Gamepad { get; set; }
Property Value
KeyboardMovementSpeed
public Vector3 KeyboardMovementSpeed { get; set; }
Property Value
KeyboardRotationSpeed
public Vector2 KeyboardRotationSpeed { get; set; }
Property Value
MouseRotationSpeed
public Vector2 MouseRotationSpeed { get; set; }
Property Value
SpeedFactor
public float SpeedFactor { get; set; }
Property Value
TouchMovementSpeed
public Vector3 TouchMovementSpeed { get; set; }
Property Value
TouchRotationSpeed
public Vector2 TouchRotationSpeed { get; set; }
Property Value
Methods
Start()
Called before the script enters it's update loop.
public override void Start()
Update()
Called every frame.
public override void Update()