bouncycube.gif

Springy Cube - Physics Sim

I created this real-time, interactive Unity simulation featuring a cube with springy, invisible struts connecting its vertices.

Springy Cube

 

I created this real-time, interactive Unity simulation featuring a cube with springy, invisible struts connecting its vertices.

 

As part of a physics simulation course, I created this real-time, interactive simulation featuring a cube whose vertices are connected by invisible spring-damper struts. This demo was developed in C# in Unity, but it does not use Unity’s built-in physics engine. Physics calculations such as collision detection, vertex trajectories, and the spring-damper response are handled by my own simulation code running within Unity’s FixedUpdate method.

Within the application, the user interacts with the cube by nudging it in various directions with key presses. These nudges are implemented as direct updates to the cube's velocity, giving it a burst of speed in a particular direction. Friction modeling on the vertices causes the cube to roll around when nudged laterally along the surface plane. The cube can also be nudged upward to hover into the air, or be nudged downward to cause the cube to make a springy jump.