Project Update: Player setup

My new game prototype currently uses a third-person camera as I wrote in the previous article. Today I focused on the movement of the character.
I started from the Character Controller of Unity to realize my prototype. I have already talked about this component and its advantages.

At the moment the capsule that simulates my player is able to move and jump mainly thanks to the Character Controller and my script Player that manages its parameters.

Its main parameters I have exposed in the Inspector thanks to the “SerializeField” command for the private variables. I have also decided to keep them in order dividing them into different sections between parameters related to the camera and those related to the player.
Thanks to the “Header” command that we can use in the code to make the Inspector more user-friendly.

One last change I made concerns the keyword “Range” that allows me to define a minimum and maximum value that my variable in this case float can take.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Andrea Alicino

Andrea Alicino

38 Followers

Unity developer and C# programmer. Currently looking for games industry employment.