Orbit Camera | Can I smoothly transition from one focus entity to another?

Looking at the orbit-camera script, you could lerp between the current and target pivot point and camera position by calling resetAndLookAtPoint each frame via an external script.

Here’s a basic example with some missing functionality (press 1 to move between points).

I would still need to disable the mouse and touch controls during transition and also not use that lerp function. The tween library from PlayCanvas is probably better for this and I would base the duration of the transition on the distance between the starting point and the target point.

https://playcanvas.com/editor/scene/984964

Edit: alternatively, I would probably change it so that I transition the distance, yaw and pitch as individual components rather than moving the camera position for a smoother orbit camera like transition :thinking:

4 Likes