hi, welcome to mix and jam a channel about game development. Experimentation today’s. Project is inspired by Star Fox [ Music ]. Star Fox, has very interesting on-rail levels that guide a player through a specific path.
I thought it’d, be interesting to try and recreate a similar rail movement using unity. So here are the steps I needed to follow for this recreation create a similar movement for the player on the X and y axis.
Taking into consideration the ship’s, rotation implement the rail system that guides the gameplay through a path and add some particles and effects to the prototype. I started off by creating an empty game object that would serve as a parent for both the camera and the player.
In that way, the object will be responsible for the rail movement later on. I added movement to the player by changing its local position. [, Music, ] and to avoid the player getting off-screen, I clamped its position based on the screen limits to add a better feel to the player movement.
I made it replicate the rotation of a new center object that would move with the axis input and to improve even more on the movement field. I made the player model rotate on the z axis whenever there was horizontal movement.
Next thing I did was to add some camera movement. In order to make the camera follow the player smoothly. I used vector three dots move them. Then I also clamped the camera position to a limit. I can determine with a vector two variable after that.
I found this motto of an arwing made by this user on turbosquid and replace the old cube with it to start testing with the rail movement itself. I added a simple script that made the parent game object, move forward with a certain speed.
That speed is the variable we can modify in order to make the player even boost or break. The velocity change is very subtle, so I made the camera zoom in on the brake and zoom out on the boost, and of course I couldn’t.
Do this project without trying to implement the classic barrel roll, so I simply use the function from do tweak called. Do local rotate on the spaceship model, with the rotate mode set to local axis? Add next thing was to find a way to lay out a rail path in an easy way to both visualize and modify one awesome way I found to do this was by using the cinema Sheen’s dolly track.
This feature is usually used to make camera, follow a path to create cinematic shots. It’s, pretty easy to modify the dolly track with the editor, and, in my case, instead of making the camera follow the track.
I made the whole parent object, follow it. Instead, then, I started working on some effects. I created a simple particle omission to replicate the spaceship plane. I also added another particle system with a trail renderer that would be displayed whenever the player was boosting.
Then I added a single emission of a circle particle for when the boost begins. I’ve created some trail runners for the spaceship wings and added a single particle emission for the barrel, [ Music ]. Finally, I started creating the level structure and modifying the rail path on the environment.
Then I added some post-processing like blue and depth of field and after a bit of adjustments, this is how it turned out [, Music ]. I would love to see. We can all do with this prototype there’s, plenty of systems.
You can add, on top of it like a shooting mechanic or even some enemy AI, if you experiment with it, make sure to share it on Twitter, using the mix and jam hashtag and, of course, to download the source files.
The link for the project’s, repository is on the description below mix and jam is only possible thanks to everyone that’s, helping out on patreon, including these top-tier supporters. If you want to see more content like this on the future, don’t forget to subscribe.
Thanks for watching and I’ll see you in the next one: [ Music, ]