Scene Properties

Let's learn about causing chaos with properties and physics.

Properties and Physics

Items on the screen are more than pictures. In fact, behind the scenes, they have properties like their position, their size, and more. This tutorial is about what these properties are and how we can update them to adjust our game.

Consider an example. Suppose there is a Red Mouth monster in (0, 0) in the 2D editor. If we select the object with the arrow keys and ENTER, or click on it, a properties window will appear. We can click on this or use COMMAND + P (Mac), or CONTROL + P (Windows) to go to it. This window gives access to: 1) Name, 2) Position, 3) Scale, and 4) Rotation. In addition, there are physics properties. This dialog looks approximately like so:

This is an image of the properties window. The top portion titled Basic Properties has the following editable boxes: Name; Position with spaces for x, y, and z; Scale with spaces for x and y; and Rotation. 
            The bottom portion is titled Physics. Options are: a check box for Enable Physics; radial options Unmoveable, Nonresponsive, and Responsive; and editible spaces for Mass, Friction, and Restitution.

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

Properties
PropertyPurpose
NameA name that can be used in the scene tree and a running game to find items.
PositionThe x, y, and z coordinate for the item. For 2D, the z coordinate is used to describe if an item is behind another.
ScaleThe x, y, and z scales of the item. The z scale only appears in 3D.
RotationIn 2D, rotation twists the image. In 3D, a rotation can be set around the x, y, or z axis.
Physics EnabledIf this is selected, the item will respond to physics operations.
UnmovableThe object can be taken into account for collisions, but does not move based on physics. A wall is a good example.
NonresponsiveThese objects can be moved but do not respond to physical forces. An example would be a moving platform.
ResponsiveAn item that responds to physical forces like gravity, force, torque, and such.
MassThis is the mass of the item measured in Newtons. It can be any number
FrictionThis is how much friction the item has. It can be any number.
RestitutionThis can be thought of how bouncy something is. A value of 0 does not bounce, whereas 1 means it bounces back to the original position. A number above 1 will bounce higher than the original position.

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.

Next Tutorial

In the next tutorial, we will discuss Run that Scene!, which describes running a scene in Quorum Studio.