Third-Person Spring-Arm Camera: Collision Probe, Critically Damped Recovery and Wall Clearance
A game camera on a spring arm follows a walking character round a courtyard of pillars and walls. Every frame a probe ray runs from the character's head towards the ideal camera position; if a wall is in the way the arm is shortened so the lens stays clear of it, and when the path frees up the arm recovers with a critically damped spring that never overshoots. Change the arm length, probe radius, recovery speed, pitch, walking radius and speed, and the yaw offset, and compare instant against smoothed pull-in. A Blender-built courtyard with numerical checks.
A game camera on a spring arm follows a walking character round a courtyard of pillars and walls. Every frame a probe ray runs from the character's head towards the ideal camera position; if a wall is in the way the arm is shortened so the lens stays clear of it, and when the path frees up the arm recovers with a critically damped spring that never overshoots. Change the arm length, probe radius, recovery speed, pitch, walking radius and speed, and the yaw offset, and compare instant against smoothed pull-in. A Blender-built courtyard with numerical checks.
A game camera on a spring arm follows a walking character round a courtyard of pillars and walls. Every frame a probe ray runs from the character's head towards the ideal camera position; if a wall is in the way the arm is shortened so the lens stays clear of it, and when the path frees up the arm recovers with a critically damped spring that never overshoots. Change the arm length, probe radius, recovery speed, pitch, walking radius and speed, and the yaw offset, and compare instant against smoothed pull-in. A Blender-built courtyard with numerical checks.
3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install