Physical Materials        

Physical Materials

Physical Material

Physical materials define the physical and gameplay behaviour of the surfaces of shapes defined in collision meshes (TCOLs).


Here are the possible properties and their defaults.

 physical_material `MyPhysicalMaterial` {
     interactionGroup = FrictionlessGroup,
     roadTyreFriction = 0,
     offroadTyreFriction = 0,
     proceduralObjects = { `MyProceduralObject`, `MyOtherProceduralObject` }

The property 'interactionGroup' defines how the material interacts with other materials. See below for more information.

The property 'roadTyreFriction' gives the friction of road tyres on this surface, and 'offroadTyreFriction' is for vehicles specifically designed to operate offroad, e.g. jeeps, dirt bikes, etc. Sensible values are about 1.

The property 'proceduralObjects' is a list giving each of the procedural object types (each must be defined itself before the physical material) to spawn on this surface.

In future there will be many more properties here. Here are some ideas: Behaviour when wet. Skidmarks/footprints/tyre tracks. Dust when walking/driving/skidding/bullet hit. Camera collisions, max incline for climbing on foot, whether running is allowed, whether a hard landing will injure the player a lot. Sounds of footsteps, bangs, scrapes, bullet hits. Whether the surface is bulletproof or weak, and whether it will burn.

Interaction Groups

Interaction groups define the friction and restitution properties of the material. These are the properties that affect how the motion changes during collisions. Because this behaviour is unique to the pair of materials involved (e.g. metal on concrete behaves quite differently to metal on plastic), the friction and restitution must be given for every possible pair. This means that the set of possible interaction groups must be predefined and small. Thus, the possible customisation is limited. The interaction groups are typically abstract, in the sense that they isolate one particular aspect of a material (e.g. roughness) and therefore can be reused among several actual physical materials (e.g. stone, wood, concrete, etc). When defining your own physical material, you should be able to find the closest interaction group that gives the material the feel you want. If you feel there is an interaction group missing, the best course of action would be to persuade us to include it as part of the core engine.

Here is the list at time of writing, from which you can pick an interaction group:

  • FrictionlessGroup
  • StickyGroup
  • SmoothHardGroup
  • SmoothSoftGroup
  • RoughGroup
  • DeformGroup

You can see the up-to-date interaction groups and their inter-behavioural definitions at the top of common/phys_mats.lua.