A Unity 3D physics simulation game where you can control objects, create dynamic elements, and observe physics interactions in real-time.
This is a 3D physics sandbox game built in Unity where players can:
- Control different objects (capsules, spheres) using keyboard input
- Create small physics objects (cubes, spheres, cylinders) that interact with each other
- Adjust object speeds and observe realistic physics collisions
- Navigate the 3D environment using mouse look controls
- Arrow Keys: Move the SPH (sphere) object
- Left/Right arrows: Move along X-axis
- Up/Down arrows: Move along Y-axis
- Plus/Minus (or Keypad +/-): Move along Z-axis
- W/S: Move forward/backward
- A/D: Move left/right
- E/X: Move up/down
- Mouse: Look around (first-person camera)
- Mouse cursor is locked during gameplay
- Space: Create random objects (cubes, spheres, cylinders)
- Single press: Creates one object
- Hold Space: Continuously creates objects after 0.5 seconds
- > (Period): Increase object speed
- < (Comma): Decrease object speed
- Speed range: 1 to 150 units
-
Random Object Properties: Each created object has:
- Random color (RGB values)
- Random size (1-10x scale)
- Random initial velocity direction
-
Physics Simulation: All objects use Unity's Rigidbody physics system for realistic collisions and movement
-
Real-time Speed Control: Adjust the speed of newly created objects during gameplay
- Built with Unity Engine
- Uses C# scripting
- Implements Unity's physics system (Rigidbody components)
- Real-time input handling for smooth controls
SPHMovement.cs: Controls sphere movement with arrow keysCapsuleMovement.cs: Controls capsule movement with WASD keysMouseLook.cs: Handles camera rotation with mouse inputCreateSmallObjects.cs: Manages dynamic object creationObject.cs: Defines properties and behavior of created objectsObjectsSpeed.cs: Manages speed control system
- Clone this repository
- Open the project in Unity (version compatible with the project)
- Open the main scene from the Scenes folder
- Press Play to start the simulation
Assets/
├── Materials/ # Material files for objects
├── Physic Materials/ # Physics materials
├── Prefabs/ # Prefab objects
├── Resources/ # Resource files
├── Scenes/ # Scene files
└── Scripts/ # C# scripts
- Unity Engine (compatible version)
- Windows/Mac/Linux system capable of running Unity games
This project was developed as part of a Computer Graphics course (Γραφικά) at the University of Ioannina, 4th year, 1st semester, 2020.
This project is for educational purposes.