The SubSteps
property of the PhysicsWorld
class allows you to control the number of substeps that the physics engine performs per tick. This can be useful if you are experiencing issues with objects passing through each other or if you have a low tickrate. By increasing the number of substeps, you can achieve more accurate physics simulations.
The default value for SubSteps
is 1, which generally provides good performance and accuracy. However, if you increase this value, be aware that the number of physics ticks per second will be the product of the tickrate and the number of substeps. For example, if your tickrate is 90 and you set SubSteps
to 1000, the engine will perform 90,000 steps per second, which can significantly impact performance.