
Begin your mini golf game in Unity with C#, and start learning today. Access the feedback area, join the Discord community, and compare against the completed project.
Set up the project by removing unused packages, import 2d sprite package and mini golf assets, and configure a two by three layout with game view set to full hd.
Set up a new empty test scene in Unity to build a simple minigolf playground with ground, walls, and a camera, then group walls and prepare for the ball.
Create and configure a golf ball in Unity by using a sphere, adding a rigidbody and physics material, and tuning bounce to 0.75, collision detection, and drag for minigolf physics.
Create a ball controller script, attach it to the golf ball, and move it forward by setting rigidbody velocity with vector3.forward and hit power when the F key is pressed.
Enhance the golf ball's visuals in Unity by replacing the sphere with a textured model, adjusting the scale and parenting it, while using pivot versus local axes to track rotations.
Control the ball's stopping behavior in Unity by using rigidbody velocity magnitude, stop cutoff, and stop speed to achieve a quick, satisfying mini golf stop.
Explore implementing slopes in a Unity minigolf scene by adding angled planes, snapping edges, and refining ball physics with a velocity-based slowdown to simulate rolling and stopping.
Implement a follow camera in Unity by creating a camera controller and assigning a target, the golf ball, so the camera tracks its movement.
Rotate the camera around its target by moving the holder object, using a private rotation value and a public move speed, with input horizontal and time.deltaTime for frame independent rotation.
Apply the rotation to the camera in Unity by converting a tracked rotation into a quaternion via quaternion Euler and setting transform.rotation, focusing on the y axis for horizontal movement.
Implement vertical rotation for the camera by separating horizontal and vertical rotations with a parent rotation point, and clamp vertical angles between 0 and 75 to prevent ground collision.
Enable mouse-driven camera rotation by reading mouse x and y axes, applying rotation with move speed and delta time, and confining the cursor to the screen.
Combine mouse and keyboard rotation in Unity, clamp the combined input with Mathf.Clamp to a maximum of one, and maintain a consistent camera movement speed.
Make the golf ball move in the camera's facing direction by using the camera's transform forward vector, and reference the camera controller to keep movement aligned with the ground.
Add a direction indicator in Unity to preview the ball’s path, using the camera controller and show/hide functions triggered by the ball’s movement.
Learn to implement a simple power-bar shot mechanic in Unity using a shot controller and ball controller, enabling click-to-fire with adjustable power and precise shot control.
Control shots by firing only when the ball stops, using a static shot controller instance and awake initialization in Unity C#.
Control and visualize shot power with an on-screen power bar using active shot power moving between zero and the maximum via Mathf.MoveTowards, delta time, and a configurable speed.
Set up a Unity UI canvas and a power bar slider to display shot power for a minigolf game, with screen size scaling and event system integration.
Learn to implement a power bar UI in Unity with a C# UI controller, controlling a slider's max and current values, and showing and hiding the power bar during shots.
Reset every shot's power to zero and update the power bar for consistent charging. Implement a half-second no-move delay to fire the shot once and show the indicator.
Set up a hole by adding a hole model to the course, adjust the ball height, and add a mesh collider to give the hole a physical presence.
Detects when the golf ball enters the cup by using a cup controller with a trigger box collider, on trigger enter, and a ball tag, logging 'ball in hole' once.
Prevent shots after the ball is in the cup by adding an in cup flag and a prevent shot method, and display an in-hole message via Text Mesh Pro.
Add a whole controller with a static instance and a shots counter to track each hole, calling addShot from the shot controller to update the display.
Display shots taken in a minigolf game using a Text Mesh Pro UI element anchored bottom-left with a blue gradient, updated by a script that shows 'shots: N'.
Add a par value to the hole controller and update a par text UI element via the UI controller script, displayed at game start.
Set up an end hole results screen in Unity by creating a centered panel, score display, and play again, next hole, and main menu buttons.
Display the end screen after sinking the ball, update the final score from shots minus par, and show the result text on the UI in Unity with C#.
Delay the end screen after the ball goes in the hole to give players a moment of feedback using a coroutine and a one-second wait.
Show golf scores as text in a Unity C# game by switching on final score to display par, bogey, birdie, eagle, albatross, condor, with a default plus/minus format and hole-in-one.
Enable play again by wiring UI buttons to a UI controller and using scene manager to reload the active scene, restarting the hole.
Lock the camera during end screen by adding a can move flag and a prevent movement method, then call it to stop movement, and use LateUpdate to prevent stuttery movement.
Add a particle system in Unity to the cup, configure a burst emission, adjust shape, color, and size over lifetime, and trigger it when the ball enters the hole.
Fix low power shot bug by setting the no move counter to wait to end shot when firing, so the ball reactivates for the next shot in unity and c#.
Create a large out of bounds zone with a box collider trigger to detect when the ball exits the course. Mark it as out of bounds and disable shooting.
Learn how to reset a minigolf ball in Unity by storing last ball position, then using a coroutine to delay and move the ball via the rigidbody, ensuring accurate resets.
Implement an out-of-bounds rule in your minigolf game by resetting the ball to the course, awarding an extra shot, and zeroing velocity and angular velocity to stop rolling.
Learn to implement an out-of-bounds notification in Unity for a minigolf game, displaying an out-of-bounds message and plus one shot, with show and hide UI controller logic.
Create a reusable level kit by organizing prefabs—the ground, golf ball, camera controller, UI canvas, cup and hole controllers, and out-of-bounds zone—for quick, scalable level creation with consistent camera targeting.
Set up a new minigolf hole by creating a scene, adding a hole with a mesh collider, aligning the cup controller, decorating with trees and rocks, and saving the scene.
Create five distinct holes in your Unity minigolf game, enable player progression between holes, and attach mesh colliders to each hole model for reliable gameplay.
Add a windmill obstacle to the fifth hole. Attach mesh colliders to the windmill and blades, and rotate on the z axis with a rotate over time script.
Learn how to create and program your very own fun and friendly golf game using Unity, an industry-standard game development program used by large gaming studios and indie developers across the world.
In this course you won’t just be learning programming concepts, but tying these concepts to real game development uses. You will have access to a course forum where you can discuss the topics covered in the course as well as the next steps to take once the course is complete.
This course has been designed to be easily understandable to everyone, so whether you’re a complete beginner, an artist looking to expand their game development range or a programmer interested in understanding game design, this course will help you gain a greater understanding of development.
At the end of this course you will have developed the ability to understand such game elements as:
Hitting The Ball
Aiming And Camera Control
Going Out Of Bounds
Full Golf Scoring System
Audio Systems
Displaying A Scorecard
Switching Between Multiple Courses
Systems To Make Level Creation Easier
And much more...
The course also includes a complete version of the project to use for your own reference to ensure everything in your game works as it should!
Start learning today and let me help you become a game developer!