OrbitCameraComponent
- Namespace: Turian.Engine.Core
- Source File: OrbitCameraComponent.cs
Orbits the camera around a fixed point at a fixed distance. Mouse deltas update yaw/pitch and the camera position is recomputed each call so it remains Distance units behind Target along the camera's Front axis.
Properties
Target
(Vector3) { get; set }: World-space point the camera orbits around.
Distance
(float) { get; set } = 5f: Distance from Target along the camera's Front axis.
LookSensitivity
(float) { get; set } = 0.005f: Mouse look sensitivity in radians per pixel.
ZoomStep
(float) { get; set } = 0.5f: Distance change per scroll unit (negative = zoom in).
Public Methods
Orbit
public void Orbit(float dxPixels, float dyPixels)
Updates yaw/pitch by mouse-pixel deltas and re-snaps the camera to its orbit position.
Parameters:
dxPixels(float)dyPixels(float)
Zoom
public void Zoom(float scrollDelta)
Adjusts Distance by a scroll amount and re-snaps.
Parameters:
scrollDelta(float)
OnLateUpdate
public override void OnLateUpdate(float deltaTime)
Parameters:
deltaTime(float)