Isak Åslund

  • # Prototype

Ensuring a Smooth Camera

I wanted a system that felt smooth and adaptive while keeping the camera properly positioned behind the player. So I built it to stop before it overtakes the player.

Solution

  • 🎥 Adaptive movement - Designed the camera to adjust fluidly without sudden shifts.
  • 🔄 No overtake rule - Ensured the camera never moves ahead of the player.
  • 📈 Dot product check - Uses spline forward and camera rotation to calculate alignment.
  • 🚦 Passing detection - If the dot product is negative, the camera has moved too far.
  • 🔧 Auto-correction - Stops to stay behind the player.

Is Camera Behind Player