Physics Overview

An introduction to ShapeBox's built-in physics engine — simulate gravity, collisions, constraints, and forces without writing code.

Physics Overview

ShapeBox includes a built-in real-time physics engine powered by a high-performance rigid-body simulator. You can give any object physical properties — making it fall, bounce, roll, or collide — directly from the Inspector without writing a single line of code.

How physics works in ShapeBox

Physics runs as part of your scene's simulation. It is inactive in editing mode so you can arrange objects freely. When you click Play (or a visitor enters your published scene), the physics simulation starts and all physics-enabled objects begin interacting.

Body types

Every physics-enabled object must have a body type:

Body typeDescription
DynamicFully simulated — falls with gravity, responds to forces and collisions
StaticFixed in place — other objects collide with it, but it never moves
KinematicMoved by scripts or animations — collides with dynamic bodies without being affected by gravity

Choosing the right type

  • Dynamic — use for balls, boxes, props, characters that fall or tumble.
  • Static — use for floors, walls, terrain, and other permanent structures.
  • Kinematic — use for moving platforms, doors, elevators, and anything animated but still collideable.

Enabling physics on an object

  1. Select the object in the editor.
  2. In the Inspector, open the Physics section.
  3. Toggle Physics Enabled on.
  4. Choose a Body Type (Dynamic, Static, or Kinematic).
  5. Press Play to test.

Core physics properties

PropertyDescription
MassDetermines how the object responds to forces (kg). Default: 1.0.
Gravity ScaleMultiplies the global gravity for this object. 0 = weightless, 2 = double gravity.
Linear DampingAir resistance for translation — slows down moving objects over time.
Angular DampingAir resistance for rotation — slows down spinning objects over time.
RestitutionBounciness (0 = no bounce, 1 = perfectly elastic). Default: 0.3.
FrictionSurface friction coefficient (0 = frictionless, 1 = very sticky). Default: 0.5.

Global physics settings

Adjust the simulation globally via Editor → Scene Settings → Physics:

SettingDefaultDescription
Gravity-9.81 m/s² (Y axis)The direction and strength of gravity
Time Step60 HzHow many times per second the simulation updates
Max Iterations10Solver iterations per step — higher = more accurate but slower

Next steps

  • Rigid Bodies — deep-dive into body properties, forces, and constraints.
  • Colliders — choose the right collision shape for accuracy and performance.