I need help trying to figure out how to go about creating a space game camera like the one in Starfox 64.
The camera moves along a path, but how do I tame the starship from moving outside of the camera? The starship moves along the same path as the camera, I would imagine, but I can’t think of a way to make the starship limit its boundaries from the path.
Can someone give me guidance on how to do this please?
Well, if you have a series of waypoints, have the camera object LookAt(nextWaypoint) while moving, make the spaceship a child of the camera, and only move in localPosition relative to the camera. You move further left, the localPosition goes further left, etc… and you just contain it inside boundaries. The trick is to increase and decrease a variable (curX, curY), then set the position to a static spot relative to the camera as it looks at the next waypoint. After that, it’s free to look at the spaceship.
I am planning to create an on-rail shooter, beside using iTween or the waypoint systems that mentioned above, is it appropriate to use the Unity animation system to record/set the animation for camera? I think the animation system offer more control for moving the camera, and I can set events, etc.