A unity project that simulates 2D circles moving around and colliding with each other using physics principles. For Optimization im using bounding volume hierarchy method, and im trying to implement other solutions for Optimization in the future.
5K+ particles with a low end pc gives about 2fps, still didnt test it with a powerful pc. It depends in the amount of spread/Radius of the particles.
After opening the project in unity (Unity 2021.3.16f1 version was created with):
- Select "SimulationHandler" in the Hierarchy.
- in the inspector you gonna find a script called "Collision Simulation Handler".
- there you can Control all the variables you need for the simulation.
- Start the Scene.
- Open the Repo Folder
- Open File Called: "Collision Simulation"
- Open File Called: "build"
- Open: "Collision Simulation.exe"
- (to close the simulation window: press Alt + F4, or Alt + Enter and then Close window button)
The prject is finished, but it just needs some UI so you can build it and play with it.