Up to date
This page is up to date for Godot 4.0
.
If you still find outdated information, please open an issue.
Troubleshooting physics issues¶
When working with a physics engine, you may encounter unexpected results.
While many of these issues can be resolved through configuration, some of them are the result of engine bugs. For known issues related to the physics engine, see open physics-related issues on GitHub. Looking through closed issues can also help answer questions related to physics engine behavior.
Objects are passing through each other at high speeds¶
This is known as tunneling. Enabling Continuous CD in the RigidBody properties can sometimes resolve this issue. If this does not help, there are other solutions you can try:
Make your static collision shapes thicker. For example, if you have a thin floor that the player can't get below in some way, you can make the collider thicker than the floor's visual representation.
Modify your fast-moving object's collision shape depending on its movement speed. The faster the object moves, the larger the collision shape should extend outside of the object to ensure it can collide with thin walls more reliably.
Increase Physics Ticks Per Second in the advanced Project Settings. While this has other benefits (such as more stable simulation and reduced input lag), this increases CPU utilization and may not be viable for mobile/web platforms. Multipliers of the default value of
60
(such as120
,180
or240
) should be preferred for a smooth appearance on most displays.
Stacked objects are unstable and wobbly¶
Despite seeming like a simple problem, stable RigidBody simulation with stacked objects is difficult to implement in a physics engine. This is caused by integrating forces going against each other. The more stacked objects are present, the stronger the forces will be against each other. This eventually causes the simulation to become wobbly, making the objects unable to rest on top of each other without moving.
Increasing the physics simulation rate can help alleviate this issue. To do so,
increase Physics Ticks Per Second in the advanced Project Settings. Note
that increases CPU utilization and may not be viable for mobile/web platforms.
Multipliers of the default value of 60
(such as 120
, 180
or 240
)
should be preferred for a smooth appearance on most displays.
Scaled physics bodies or collision shapes do not collide correctly¶
Godot does not currently support scaling of physics bodies or collision shapes. As a workaround, change the collision shape's extents instead of changing its scale. If you want the visual representation's scale to change as well, change the scale of the underlying visual representation (Sprite2D, MeshInstance3D, …) and change the collision shape's extents separately. Make sure the collision shape is not a child of the visual representation in this case.
Since resources are shared by default, you'll have to make the collision shape
resource unique if you don't want the change to be applied to all nodes using
the same collision shape resource in the scene. This can be done by calling
duplicate()
in a script on the collision shape resource before changing
its size.
Thin objects are wobbly when resting on the floor¶
This can be due to one of two causes:
The floor's collision shape is too thin.
The RigidBody's collision shape is too thin.
In the first case, this can be alleviated by making the floor's collision shape thicker. For example, if you have a thin floor that the player can't get below in some way, you can make the collider thicker than the floor's visual representation.
In the second case, this can usually only be resolved by increasing the physics simulation rate (as making the shape thicker would cause a disconnect between the RigidBody's visual representation and its collision).
In both cases, increasing the physics simulation rate can also help alleviate this issue. To do so, increase Physics Ticks Per Second in the advanced Project Settings. Note that this increases CPU utilization and may not be viable for mobile/web pla