Modified waypoint functions in GameObject.cs.