In this video I show my first attempt at a on rail camera system that does the following:
– Using a spline across the three rooms the playerFollow object returns the point closest to the player on the rail and places itself there.
– At the same it get’s it’s point on the spline overall and sends it to the camera, which then positions itself on the corresponding point on a separate track.
-Finally when the player moves through particular triggers a camera, that culls everything but the player and vent area asset, is appropriately activated or deactivated.
This is all in the very basic stages right now, as I go on I will probably give in and buy some of the unity store assets for splines and rail paths as the math for this goes way over my head. In the meanwhile though I should just about be able to hobble along with some quick and shoddy scripting that will work will enough for what I need.
For reference on how to do some of the stuff show in this video here are links to the places I used to research this stuff:
A great step by step look at implementing splines and curves to your game, along with some basis scripts that actually use them like a path walker.
A video that goes through culling mask(and the required camera set up) needed for the masking effect used above.