Physics Configs
Physical configuration is used to configure various commonly used properties.
Property description

gravityGravity direction vector, the sign means the positive or negative direction on the axis. Default:{ x: 0, y: -10, z: 0 }.allowSleepWhether to allow rigid bodies to enter sleep state. Default:true.sleepThresholdThe maximum speed threshold for entering sleep. Default:0.1. Min:0.autoSimulationWhether to enable automatic simulation.fixedTimeStepFixed time step between each simulation. Default:1/60. Min:0.maxSubStepsMaximum number of substeps per simulation step. Default:1. Min:0.frictionCoefficient of friction. Default:0.5.rollingFrictionRolling friction coefficient. Default:0.1.spinningFrictionSpin friction coefficient. Default:0.1.restitutionCoefficient of elasticity. Default:0.1.collisionMatrixThe collision matrix, used only for initialization.
Collision Matrix
The collision matrix is used to initialize groups and masks of physical elements.

Grouping concept
In the editor, the grouping format of the collision matrix is {index, name}, index is the number of bits from 0 to 31, and name is the name of the group. The new project will have a default grouping: {index: 0, name: 'DEFAULT'}.
By clicking the + button you can add a new group.
Note: both index and name cannot be empty and cannot be repeated with existing items; after adding, the group cannot be deleted, only the name of the group can be modified.
How to configure
Take a new water group as an example:

This table lists all the groups, and you can check it to determine which two groups will do the collision detection.
As shown in the figure above, whether DEFAULT and water will perform collision detection will be determined by whether the corresponding check box is checked.
According to the above rules, the collision pairs generated in this table are:
- DEFAULT - water
- DEFAULT - DEFAULT
And the grouping pairs that do not perform collision detection include:
- water - water
Configure groups of physical components
In addition, the Group property on the RigidBody component needs to be configured into the corresponding physical element:
