- Add options for physics ticks per second, time scale, max physics steps per frame
and physics interpolation to the 2D and 3D physics tests demos.
- Physics ticks per second are always multiplied by time scale so that
time scale does not affect the physics simulation quality.
- Enable 4× MSAA for better debug shape display. Remove meshes/lights as
the debug collision fill make these unnecessary.
- Switch to the Mobile rendering method in the 2D physics tests demo
to allow for 2D MSAA, as it's not implemented in Compatibility yet.
- Improve collision shapes color in the 2D and 3D physics tests demos
for better visibility. Each PhysicsBody type now has its own collision
shape color.
RigidBody Character 3D
RigidBody character demo for 3D using a capsule for the character. Cubes as RigidBodies spawn in the map from above to show interaction with the player (jump on them, gently push them), which would be impossible with a CharacterBody.
Language: GDScript
Renderer: Forward+
Check out this demo on the asset library: https://godotengine.org/asset-library/asset/2750
How does it work?
This demo uses a RigidBody3D
for the player, and StaticBody3D
for the level. Each has colliders, the player moves itself via
apply_central_impulse() in _physics_process(), and collides with the level.
The ShapeCast3D node is used to detect whether the player is able to jump
(i.e. touching the floor). Compared to a RayCast3D which is infinitely thin,
this allows for more reliable checking if the player is standing over an edge or
corner.
