Camera movement end

Hello all!
How to detect when smooth camera movement is ended?

That kind of depends. How is the camera moving?

Is it being animated by an animation?
If so checks this out:
Advanced Animation Methods | Babylon.js Documentation (babylonjs.com)

Or is it moved by player input? Like say when a key is pressed down? If so, you can add key-up events like in this:
Observables | Babylon.js Documentation (babylonjs.com)

This is a default ArcRotationCamera with inertia > 0

For simplicity I am just storing previous camera position and subtracting each coordinate from actual camera position coordinates and if result is not 0 then camera is still rotating.

1 Like