A Unity obstacle course prototype — movement, hazards, and physics-driven gameplay.
Navigate spinning hazards. Dodge falling obstacles. Don't get hit.
A small 3D obstacle course game where the player weaves through hazards while avoiding collisions. Built as a hands-on Unity project to strengthen core gameplay scripting — player control, obstacle behaviour, physics interaction, and scoring.
Move through the course without hitting hazards. Each collision is tracked and triggers a visual colour change on the object you hit.
| Input | Action |
|---|---|
W A S D |
Move player |
Arrow Keys |
Move player |
Mechanics at a glance:
- Spinning obstacles that rotate continuously
- Falling obstacles that drop in after a timed delay
- Visual feedback on collision — objects turn red
- A running collision counter that ignores repeat hits
| Script | Role |
|---|---|
mover.cs |
Player movement via keyboard input, prints startup instructions to console |
spinner.cs |
Rotates objects each frame using configurable X, Y, Z values |
dropper.cs |
Disables gravity on start, waits a delay, then drops the object into the course |
objecthit.cs |
Detects player collisions, changes material colour to red, flags object as hit |
scorer.cs |
Counts unique collisions, skipping objects already flagged |
ObstacleCourse-unity/
├── Assets/
│ ├── Scenes/
│ │ └── SampleScene.unity
│ ├── materials/
│ ├── prefabs/
│ └── scripts/
│ ├── dropper.cs
│ ├── mover.cs
│ ├── objecthit.cs
│ ├── scorer.cs
│ └── spinner.cs
├── Packages/
└── ProjectSettings/
| Engine | Unity 2022.3.29f1 |
| Language | C# |
| Physics | Unity Rigidbody system |
| Input | Default Unity input axes |
1. Clone this repository
2. Open the project in Unity 2022.3.29f1
3. Open SampleScene
4. Press Play in the Unity Editor
This project was useful for building experience with:
MonoBehaviourscripting and lifecycle methods- Runtime behaviour using
Update() - Collision detection with
OnCollisionEnter - Working with
Rigidbodyand gravity toggling - Using tags to control gameplay logic
- Keeping scripts simple, modular, and reusable
| Area | Idea |
|---|---|
| Progression | Win condition and finish line |
| Challenge | Timer system |
| UI | Score display and status overlay |
| Recovery | Checkpoints and respawning |
| Design | More obstacle variety and level layout |
| Polish | Sound effects and visual feedback |
A compact Unity project demonstrating core scripting fundamentals through a playable obstacle course prototype.
Built as a foundation for larger projects involving movement, hazards, and interactive level mechanics.