Physics Settings
Last updated
Last updated
Unity's physics engine can be customized through the project settings panel. Only some values are available for games to customize in editor. Other values will need to be modified at runtime via TS code or not at all.
Available to Customize In Editor:
Gravity
Bounce Threshold
Default Max Depenetration Velocity
Sleep Threshold
Default Contact Offset
Default Solver Iterations
Default Solver Velocity Iterations
Queries Hit Backfaces
Queries Hit Triggers
Game Layer Physics Matrix (Any modifications to the core layers in the physics matrix will be overwritten)
You can edit physics settings at runtime just like you would in C# by accessing the Physics static object.
To modify the physics matrix in code you can use