Hugo Locurcio 2a962929f3 Update demo files for Godot 4.2.1 (#1013) 8 months ago
..
models 2a962929f3 Update demo files for Godot 4.2.1 (#1013) 8 months ago
player 1d5184e235 Update most demos for Godot 4.0.beta10 (#782) 1 year ago
screenshots 1d5184e235 Update most demos for Godot 4.0.beta10 (#782) 1 year ago
README.md 1d5184e235 Update most demos for Godot 4.0.beta10 (#782) 1 year ago
cube_rigidbody.tscn 1d5184e235 Update most demos for Godot 4.0.beta10 (#782) 1 year ago
cubelib.tres b47178faac Use a different color for moving platforms in platformer demos (#907) 1 year ago
default_env.tres 1d5184e235 Update most demos for Godot 4.0.beta10 (#782) 1 year ago
icon.webp 63d1cd9a60 Use 128×128 WebP icons for all demos (#885) 1 year ago
icon.webp.import 63d1cd9a60 Use 128×128 WebP icons for all demos (#885) 1 year ago
level.gd bbe50fc9da Convert demos to Godot 4 using regular expressions in a script 2 years ago
level.tscn b47178faac Use a different color for moving platforms in platformer demos (#907) 1 year ago
project.godot 2a962929f3 Update demo files for Godot 4.2.1 (#1013) 8 months ago

README.md

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 KinematicBody.

Language: GDScript

Renderer: GLES 3

Check out this demo on the asset library: https://godotengine.org/asset-library/asset/1291

How does it work?

This demo uses a RigidBody for the player, and StaticBody 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.

Screenshots

Screenshot