PhysicsMaterial
Since 0.6
What a collider is made of: its friction, its bounce and, for a character standing on it, how steep it may be before it is slid down.
Examples: an icy racetrack { friction: 0.02 }, a rubber bumper { restitution: 0.9 }, a slide { friction: 0.05, slopeLimit: 10 }.
Fields
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
friction | number | no | 0 | Coulomb friction coefficient, 0 or more. Defaults to 0.5, or to the entity's rigidbody.friction when it has one; this wins over that when both are given. Rigid bodies use it as the solver does. A character controller standing on the collider takes its grip from it: friction / 0.5, capped at 1, scales how fast the character can speed up, slow down and turn. 0.05 is ice (a tenth of the grip), 0 keeps whatever velocity the character arrived with, and 0.5 or more is full grip. | |
restitution | number | no | 0 | Bounciness for rigid bodies, 0..1: 0 stops dead, 1 bounces back as fast as it arrived. Defaults to 0, or to the entity's rigidbody.restitution. The character controller does not bounce; a game that wants it adds velocity on the land event. | |
slopeLimit | number | no | Steepest slope, in degrees 0..90, that a character controller can stand on when the slope is this collider. It replaces the controller's own 45 degree limit on this collider only, in either direction: 10 turns a gentle icy ramp into something to slide down, 70 lets a grippy climbing wall be walked up. Absent keeps the controller's limit. |