Skip to content

shawn-d123/ObstacleCourse-unity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🏁 ObstacleCourse

A Unity obstacle course prototype — movement, hazards, and physics-driven gameplay.

Unity C# Status

Navigate spinning hazards. Dodge falling obstacles. Don't get hit.


About

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.


Gameplay

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

Scripts

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

Project Structure

ObstacleCourse-unity/
├── Assets/
│   ├── Scenes/
│   │   └── SampleScene.unity
│   ├── materials/
│   ├── prefabs/
│   └── scripts/
│       ├── dropper.cs
│       ├── mover.cs
│       ├── objecthit.cs
│       ├── scorer.cs
│       └── spinner.cs
├── Packages/
└── ProjectSettings/

Tech Stack

Engine Unity 2022.3.29f1
Language C#
Physics Unity Rigidbody system
Input Default Unity input axes

How to Run

1. Clone this repository
2. Open the project in Unity 2022.3.29f1
3. Open SampleScene
4. Press Play in the Unity Editor

What I Practised

This project was useful for building experience with:

  • MonoBehaviour scripting and lifecycle methods
  • Runtime behaviour using Update()
  • Collision detection with OnCollisionEnter
  • Working with Rigidbody and gravity toggling
  • Using tags to control gameplay logic
  • Keeping scripts simple, modular, and reusable

Possible Improvements

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.

About

Physics-based Unity platformer built with C#, featuring player movement, obstacles, and collision mechanics.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages