Development Time: Three Hours
Technology Used: Unity 3D using C# for scripting
This demo shows my implementation of a Catmull-Rom spline. A Catmull-Rom spline is a variation of a cubic Hermite spline, where the tangents for a control point is calculated using half the distance from the previous point to the next point. At first I was going to implement a standard cubic Hermite spline, but decided that a Catmull-Rom was a simple enough variation that would save time in calculating the proper tangents. This demo was partially inspired by a presentation I saw by Squirrel Eiserloh at GDC in 2009.
There is a known bug, which causes the camera to bounce a little when reaching the target control point. That could simply be caused the placement of the control points. The pathing works just fine, so I’m not concerned with how smooth the transition is. I’m sure a bit of tweaking would fix it.