CameraExtensions.ZoomSmooth(this ICamera, float, float, float) Method
Definition
Namespace: Brine2D.Rendering
Smoothly adjusts the camera zoom towards a target value using exponential decay.
C#
public static void ZoomSmooth(this Brine2D.Rendering.ICamera camera, float targetZoom, float smoothing, float deltaTime);
Parameters
camera ICamera
The camera to zoom.
targetZoom System.Single
Target zoom level \(1\.0 = normal, 2\.0 = 2× zoom in\).
smoothing System.Single
Smoothing factor. Higher = snappier. ≤ 0 = instant snap.
deltaTime System.Single
Time since last frame in seconds.