Smooth Camera Transitions

2024-08-06に共有


I got a lot of comments about my smooth camera transitions in a recent WIP that I posted. I thought I'd just go ahead and share how I did it with a code sample cart. I'm posting the important function below, but feel free to look at the cart's code to see how it's implemented. I'm not a wizard, and I know it could probably be simplified somehow, so feel free to use and improve as you see fit. If you do improve it, let me know here so I can update the code for others to see!

UPDATE: I fixed a minor bug. (I had smooth_cam(speed) running aftermap(0,0), when it should be running before. I also added the Z/X buttons to allow you to change the speed of the transition for this demo so you can see what different speeds look like.