Загрузка...

60 Unity 6 Basketball Game Tutorial | Teaching Maths with Vectors, Coordinates & Physic

0:00 – Session Intro: Prototype → Basketball Game
0:20 – Math Concepts Covered (vectors, coordinates, trigonometry, trajectory)
1:00 – Gameplay Demo: Drag/Swipe Aim + Trajectory Preview + Scoring
2:06 – Create New Unity 6 URP Project
2:30 – Download Assets from Patreon (60A, 60B + scripts + layout)
3:16 – Clean Project: Remove Readme + Delete Input Actions File
3:35 – Fix Layout (Load Sathvic Layout if needed)
4:01 – Import 60A Counter Prototype Package
4:25 – Run Prototype + Fix New Input System UI Error (EventSystem)
5:05 – Understand Counter.cs (OnTriggerEnter counting)
6:13 – Import 60B Basketball Starter Package
6:54 – Explore Basketball Scene (Ring, Net, Ball, Floor)
7:25 – Ball Physics Setup (Continuous Dynamic + Interpolate)
7:36 – Add Ring Mesh Collider + Create Ground Layer
8:08 – Create Ball Tag + Assign to Basketball
8:41 – Create Scoring System: Top Trigger + Bottom Trigger
10:37 – Add Trajectory LineRenderer (material, width, color)
11:33 – Create GameManager Object
11:48 – Create Scripts Folder + Add 3 Scripts (GameManager, BallThrower, ScoreGateTrigger)
13:25 – Create Ball Spawn Point + Position Ball
14:24 – Setup Camera Angle for Gameplay View
15:34 – Build UI with TMP (Score, Balls Left)
17:04 – Game Over Panel + Final Score + Restart Button
18:45 – Paste Scripts into Unity (from downloaded .txt files)
19:41 – Connect UI References in GameManager
20:29 – Fix Unity 6 Warning (velocity → linearVelocity)
21:25 – Assign BallThrower References (Camera, Spawn, Target, Line, Ground Mask)
22:25 – Configure ScoreGateTrigger (Top = ON, Bottom = OFF)
23:13 – Final Playtest: Drag/Release Shots + Score Works
23:44 – Next Session Preview: Add Sliders + Explain Code Line-by-Line

Get free resources for this course from the below patreon link

https://www.patreon.com/posts/145923169

Finished Games can be tested with the link below

https://play.unity.com/en/user/41416812-3867-41f0-b452-aba3bf0fd77d

In this 60th session of the Junior Programmer Series, we start with a very simple prototype and gradually build it into a complete basketball game using Unity 6 (URP) — while simultaneously learning core mathematics concepts through gameplay.

We begin with a basic Counter prototype that uses just one script and one trigger collider to count falling balls. Using the same idea, we then design a fully interactive basketball game where players drag or swipe to aim, preview the trajectory, and score by throwing the ball through the hoop.

This game is designed not just for entertainment, but as a classroom teaching tool. Teachers can use this project to explain important math concepts visually and interactively, making abstract formulas easy to understand.

🧠 Mathematics Concepts Covered Through the Game

Coordinate Geometry & Cartesian Coordinates

Distance Between Two Points

Direction Vectors

Vector Magnitude & Unit Vectors

Direction vs Strength

Converting Swipe Length into Vector Magnitude

Angle Control using Trigonometry

Projectile Motion & Trajectory (Parabolic Path)

🎮 Game Features

Drag / Swipe to aim the basketball

Real-time trajectory preview line

Angle and strength control using mouse or touch

Scoring system using top & bottom trigger gates

Limited balls (misses) and game-over logic

UI built with TextMeshPro

Compatible with PC and Mobile

Uses Unity 6 + New Input System

🛠 What You Will Learn (Unity & Game Dev)

Using Rigidbody, Colliders, and Triggers

Understanding OnTriggerEnter with real examples

New Input System (Mouse + Touch)

LineRenderer for trajectory visualization

Clean game architecture using:

GameManager

BallThrower

ScoreGateTrigger

Fixing common Unity 6 warnings and setup issues

Building UI with Canvas, Panels, and Buttons

📦 Resources Used (Available via Patreon)

60A Counter Prototype Unity Package

60B Basketball Game Starter Package

BallThrower Script

ScoreGateTrigger Script

GameManager Script

Sathvic Layout File (optional)

👉 Patreon link is available in the description below

▶️ What’s Next?

In the upcoming sessions, we will:

Explain every line of code in detail

Add UI sliders to control power and angle

Explore the math behind trajectory equations

Turn this into a complete educational game system

👨‍🏫 Ideal For

School & College Students

Teachers & Educators

Game Development Beginners

STEM & EdTech Projects

Anyone who wants to learn Math through Games

If you found this useful, like, share, and subscribe to support the series.

Видео 60 Unity 6 Basketball Game Tutorial | Teaching Maths with Vectors, Coordinates & Physic канала Sudheendra S G
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять