Table of Contents

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

bool

KeyboardMovementSpeed

public Vector3 KeyboardMovementSpeed { get; set; }

Property Value

Vector3

KeyboardRotationSpeed

public Vector2 KeyboardRotationSpeed { get; set; }

Property Value

Vector2

MouseRotationSpeed

public Vector2 MouseRotationSpeed { get; set; }

Property Value

Vector2

SpeedFactor

public float SpeedFactor { get; set; }

Property Value

float

TouchMovementSpeed

public Vector3 TouchMovementSpeed { get; set; }

Property Value

Vector3

TouchRotationSpeed

public Vector2 TouchRotationSpeed { get; set; }

Property Value

Vector2

Methods

Start()

Called before the script enters it's update loop.

public override void Start()

Update()

Called every frame.

public override void Update()