Document physics material (#4817)

(cherry picked from commit b999f71b09)
This commit is contained in:
Matthew
2021-04-06 03:54:10 -04:00
committed by Rémi Verschelde
parent 95f0bd2b82
commit 8758dd6185
2 changed files with 12 additions and 1 deletions

View File

@@ -51,6 +51,13 @@ The other three bodies extend :ref:`PhysicsBody2D <class_PhysicsBody2D>`:
A body that provides collision detection, but no physics. All movement and
collision response must be implemented in code.
Physics material
~~~~~~~~~~~~~~~~
Static bodies and rigid bodies can be configured to use a :ref:`physics material
<class_PhysicsMaterial>`. This allows adjusting the friction and bounce of an object,
and set if it's absorbent and/or rough.
Collision shapes
~~~~~~~~~~~~~~~~

View File

@@ -12,7 +12,11 @@ In order to define the shape of the body, it must have one or more :ref:`Shape <
How to control a rigid body
---------------------------
A rigid body's behavior can be altered by setting its properties, such as friction, mass, bounce, etc. These properties can be set in the Inspector or via code. See :ref:`RigidBody <class_RigidBody>` for the full list of properties and their effects.
A rigid body's behavior can be altered by setting its properties, such as mass and weight.
A physics material needs to be added to the rigid body to adjust its friction and bounce,
and set if it's absorbent and/or rough. These properties can be set in the Inspector or via code.
See :ref:`RigidBody <class_RigidBody>` and :ref:`PhysicsMaterial <class_PhysicsMaterial>` for
the full list of properties and their effects.
There are several ways to control a rigid body's movement, depending on your desired application.