During the week of February 25th 2019, I worked on incorporating splines into Unity.
Splines allow any game object to move across a predetermined curve. The type of curve I used in this situation was the Bezier curve, which creates a spline with four points and allows a smooth curvature transition between them.
The objective of this week’s task was to allow the player avatar to smoothly move while on a spline. This is a technique often seen in 2.5d games to allow preservation of the 2d field while allowing movement across a 3d plane.
The spline worked successfully, locking the player’s rotation and stopping the player from moving outside of the spline’s route.
However, in locking the player’s rotation, it prevented them from turning when the spline changes direction, which is an oversight in the player’s movement code which would be taken into account if the player’s movement code was reworked.
Additionally, I would have altered the camera used to either be on its own spline, or to focus on the side angle of the avatar, allowing it to move appropriately when the player is on the spline.