The exercise here demonstrates the process to setup a simple platformer game project in Unity.
- Go ahead and create a 3D project from the Unity hub and save it at the appropriate location.
- Once opened, add a 3D cube and stretch it on the x axis to make it resemble to a platform object.
- Make it a prefab and add a few of those prefabs in the scene.
- Now, to add a player object, use a 3D capsule in the project.
Note: The Unity tool box has an inbuilt component for mimicking physics. The project here will be customizing its own physics and hence, do not add a collider or a rigid body to the player object.
- Add a character controller to the 3D capsule object and place it on the exact z dimension as the platform so that the player will be able to jump/move on the same level.
- Lastly, a platformer project always has collectible objects. So, add a 3D cube on the same z level as other objects to mimic a collectible object.
- Add a collider and a rigid body to this object. Also, untick the gravity option so that it does not fall off.
- Once added, make a prefab of it and then, add a few of those collectibles in the project.
That should be good to get going with the platformer project :)
Thank you very much