Properties and Physics

Overview

Items on the screen are more than pictures. Behind the scenes, they have properties like their position, their size, and more. This page is about what these properties are and how we can change them in Quorum Studio's Properties panel to adjust our game, including the physics settings that decide how items fall, slide and bounce. Let's learn about causing chaos with properties and physics.

Goals

By the end of this lesson, you can

  • Explain the basic ideas of physics: force, mass, gravity, friction and bounce, and where they come from
  • Describe how Quorum runs physics, and the difference between Unmovable, Nonresponsive and Responsive items
  • Find the Properties panel and move into and out of it with the keyboard
  • Change physics properties and gravity, and predict how an item will behave

Warm up

Think of a ball, a brick and a balloon. Make a short list of the facts you would need to write down about each one so that a computer could make it act like the real thing. Which facts are about where it is, which are about how it looks, and which are about how it moves?

Vocabulary

You will be learning about the following vocabulary words:

Vocabulary
TermDefinition
PropertyOne fact about an item, such as its name, position or mass, that can be read and changed.
PhysicsRules that make items move like real objects: falling, sliding, bouncing and pushing each other.
ForceA push or a pull. Forces are measured in newtons, named after Isaac Newton. One newton is about the force it takes to hold up a small apple.
MassHow much matter an item has, measured in kilograms. Heavier items are harder to push.
GravityThe pull that makes things fall. On Earth, it speeds a falling thing up by about 9.8 meters per second, every second.
FrictionHow much an item resists sliding against something else.
RestitutionHow bouncy an item is.
ResponsivenessWhether physics can move an item, and whether forces like gravity act on it.
Time stepThe small slice of time physics moves forward each time it runs. In Quorum it is 1/60 of a second.

CSTA Standards

For teachers · 2026 CSTA K–12 Computer Science Standards

HS-DAT-DI-26

High School · Data & Analysis

Evaluate a data simulation or visualization to answer a data question, inform decision-making, and identify potential limitations.

Also in 2 other lessons

HS-DAT-DC-24

High School · Data & Analysis

Evaluate different approaches to verifying consistency and compliance with expected data types, values, and ranges.

Also in 3 other lessons

S1-XCS-XC-01

Specialty I · X+CS

Explain connections between CS concepts and practices and those from a non-CS discipline (X).

Also in 3 other lessons

Every standard, and the lessons that cover it

Explore

Physics: how things move

When you drop a ball, it falls. When you roll it across a carpet, it slows down and stops. When it hits the floor, it bounces, but never quite as high as where it started. These everyday things follow rules, and the study of those rules is called physics.

Many of these rules were first written down by Isaac Newton, an English scientist who lived from 1643 to 1727. In 1687 he published a book called Philosophiæ Naturalis Principia Mathematica (Mathematical Principles of Natural Philosophy), commonly known as the Principia. In it he explained how things move with three simple ideas, now called Newton's laws of motion:

  1. Things keep doing what they're doing. A ball sitting still stays still, and a ball rolling keeps rolling in a straight line, unless a force pushes or pulls it. A rolling ball only stops because something, like the carpet, is pushing back on it.
  2. A bigger push makes a bigger change, and heavier things change less. Push a toy car gently and it rolls slowly; push it hard and it speeds off. Push a real car just as hard and it barely moves, because it has much more mass.
  3. Every push gets pushed back. When you push on a wall, the wall pushes back on you just as hard. That's why you can push yourself off a wall on roller skates.

Newton also explained gravity: every object pulls on every other object. The Earth is so big that its pull is the one we notice, and it pulls everything toward the ground.

A game's physics uses the same ideas. Each item can have a few physical properties:

  • Force is a push or a pull, measured in newtons. Gravity is a force, and so is a kick, a jump, or wind.
  • Mass is how much stuff an item has, measured in kilograms. The more mass, the harder it is to start the item moving, or to stop it. A surprising fact: without air in the way, heavy and light things fall at the same speed, because gravity pulls harder on heavier things by just the right amount.
  • Friction is how much an item resists sliding. Ice has very little friction; sandpaper has a lot.
  • Restitution is how bouncy an item is. A lump of clay has almost none, a rubber ball has a lot.

Physics in Quorum

In Quorum, physics is turned on for each layer of a game, and then for each item. An item takes part in physics only if its Physics Enabled box is checked. Each item with physics also has a responsiveness, which says how physics treats it:

  • Unmovable items never move, no matter what hits them, but other items bump into them. Floors, walls and the ground are unmovable. Items start out unmovable.
  • Nonresponsive items can move, but forces don't push them. Your code sets how fast they go, and gravity doesn't pull them. They push other items out of the way, but nothing pushes them back. A moving platform or an elevator is a good example: it keeps to its path even when the player lands on it.
  • Responsive items are pushed around by everything: gravity, forces, and other items bumping into them. Balls, crates and players are usually responsive. Choosing Responsive gives an item a mass of 1 kilogram if it had none.

Physics doesn't run continuously, the way the real world does. Instead, Quorum moves time forward in small steps, called time steps, of 1/60 of a second, which is 60 steps every second. In each step, it works out every force on each responsive item, updates how fast the item is going, moves it a little, and then checks whether anything is now touching or overlapping. If two items have hit each other, it pushes them apart and makes them bounce or slide.

A few things follow from working in steps:

  • Your game draws its pictures in frames. Quorum runs at most one physics step per frame, so if a game draws fewer than 60 frames a second, its physics runs in slow motion instead of jumping ahead.
  • Items are drawn smoothly between their last two steps, so motion doesn't look jerky.
  • A very small, very fast item can sometimes pass right through a thin wall, because in one step it is in front of the wall and in the next it is already past it.
  • When two items touch, Quorum uses the bouncier of their two restitutions, and multiplies their two frictions together. So a ball with no bounce still bounces off a bouncy floor, and anything slides on a floor with no friction.

Changing gravity

Gravity in a Quorum game is not on until your code sets it. The Main.quorum file that comes with a 3D scene project turns on physics and sets gravity for you, right after it loads the scene:

LoadScene(file)
EnablePhysics3D(true)
SetGravity3D(0, -10, 0)

SetGravity3D takes three numbers, for x, y and z, in meters per second, every second. 0, -10, 0 means pull down along y. Real gravity on Earth is about 9.8, and many games round it to 10. You can change these numbers to make a different world:

  • SetGravity3D(0, -1.6, 0) is about the Moon's gravity, so things fall slowly and jumps go high;
  • SetGravity3D(0, -25, 0) is much stronger, so things fall fast and heavily;
  • SetGravity3D(0, 10, 0) pulls up instead of down;
  • SetGravity3D(5, -10, 0) pulls down and to the right, like a strong wind.

A 2D game uses EnablePhysics2D(true) and SetGravity2D, which takes two numbers, x and y. Running a Scene shows where this code goes.

The Properties Panel

The Properties panel sits on the right side of every scene tab, next to the scene. It always shows the properties of whatever is selected. When nothing is selected, it says "Nothing selected". If its fields are taller than the tab, it scrolls. You can drag the bar between the scene and the panel to make the panel wider or narrower.

Consider an example. Suppose there is a Red Mouth monster at 0, 0 in the 2D editor. If we select it, with the arrow keys and Enter or by clicking on it, its properties appear in the panel. We can click on a field, or press Command+P on Mac or Control+P on Windows, to move into the panel. Then:

  • Tab and Shift+Tab move from field to field;
  • type a new value into a field to change the item;
  • Escape or Enter goes back to the scene, to the selected item.

A screen reader reads each part of the panel as a named group, such as "Object Properties", and reads each field with its name, such as "X" or "Mass".

The Properties panel beside a 2D scene, showing Basic Properties and Physics for a selected Red Mouth monster.

What the Panel Shows

Different kinds of items have different properties, so the panel shows a different section for each:

  • Object Properties, for 2D items and for 3D shapes and models. It has Basic Properties (name, position, scale, rotation, and for 3D items, color) and Physics.
  • Camera Properties, when the camera is selected (Alt+F, or Option+F on Mac). In 3D: distance, direction (yaw and pitch), zoom and field of view. In 2D: position and zoom.
  • Point Light Properties: name, position, color and intensity.
  • Audio3D Properties: name, the sound file, position, volume and pitch, and advanced settings such as how far away the sound can be heard and whether it loops.
  • A terrain has several sections of its own: Terrain, Materials, Brush, Generate and Physics. These are explained on the Terrain in a Scene page.

The properties also show while you place a new item, before you press Enter, so you can set them right away.

Object Properties

These properties let us change what an item does in a variety of ways. The following table briefly describes them.

Object Properties
PropertyPurpose
NameA name that can be used in the scene tree and in a running game to find items.
PositionThe x, y, and z coordinates of the item. In 2D, the z coordinate says whether an item is in front of or behind another.
ScaleHow large the item is along x, y, and, in 3D, z. A scale of 1 is the item's normal size.
RotationIn 2D, one angle twists the image. In 3D, the item can be turned by its yaw (left and right), pitch (up and down), and roll (tilting to the side).
Color (RGB)In 3D, the item's red, green, and blue amounts, each from 0 to 1.
Physics EnabledIf this is checked, the item takes part in physics.
UnmovableThe item is taken into account for collisions, but physics never moves it. A wall is a good example.
NonresponsiveThe item can be moved, but does not respond to physical forces. An example would be a moving platform.
ResponsiveThe item responds to physical forces like gravity, force, and torque. Choosing it gives the item a mass of 1 if its mass was 0.
MassThe mass of the item, measured in kilograms. Heavier items are harder to push.
FrictionHow much friction the item has. 0 means it slides like ice; larger numbers make it grip.
RestitutionHow bouncy the item is. A value of 0 does not bounce, whereas 1 means it bounces back to its original height. A number above 1 bounces higher than where it started.

Changes typed into the panel can't be undone yet with Undo, so it helps to write down a value before changing it.

Having Fun with Physics

Getting the properties to work how you want for your game can be a fun and silly adventure. Adjusting physics and watching items bounce around and cause chaos is part of it. As such, for teachers and students alike, it is more than ok to have a bit of fun with them. The physics tutorials, such as Mass and Friction in 3D, explain more about what these numbers do.

Engage

This activity is the first half of an experiment that you'll finish in the next tutorial, Running a Scene. In this half, you and a partner write hypotheses: clear predictions about how a simple object will behave when you change its physics, and why. The goal is to connect each physics property to what you expect to see, using what you learned on this page. You won't run anything yet; in the next tutorial you'll test each hypothesis. Set up a 3D scene with a floor: a Cube with Physics Enabled, set to Unmovable, and scaled to 10, 0.2 and 10 in the Properties panel. Add a ball: a Sphere 3 meters above the floor, with Physics Enabled and set to Responsive. Save the scene, so it's ready for the tests.

Now, for each change below, write a hypothesis in the form If we change ___, then the ball (or cube) will ___, because ___. Keep your list somewhere safe; you'll need it next time.

  • Responsiveness: set the ball to Unmovable, then Nonresponsive, then Responsive. Which ones fall?
  • Restitution: with the floor's restitution at 0, set the ball's to 0, then 0.5, then 1, then 1.5. How high does it bounce each time?
  • Mass: set the ball's mass to 1, then to 100. Does the heavier ball fall faster, slower, or at the same speed?
  • Friction: tilt the floor by setting its pitch to 20 degrees, and replace the ball with a cube. Set the cube's friction to 0, then 0.5, then 1. Does it slide, and how fast?
  • Gravity: in Main.quorum, SetGravity3D(0, -10, 0) becomes 0, -1.6, 0, then 0, -25, 0, then 0, 10, 0. How does the ball's fall change?
  • Physics Enabled: uncheck it on the floor. What happens to the ball?
  • A value that doesn't make sense: give the ball a negative mass or a negative restitution. What will Quorum Studio and the game do?

When your list is done, swap with another pair and read their hypotheses. Where you disagree, talk about why, but don't change your own: a hypothesis that turns out wrong is just as useful as one that turns out right. Then mark each of your hypotheses where you think the simulation might behave differently from the real world.

Wrap up

Every item in a scene is really a set of data: a name, numbers for where it is and how big it is, and settings for physics. The Properties panel lets us read and change that data directly, with the mouse or the keyboard. Next, we run a scene and test the hypotheses you wrote today.