Aaron Franke 5646c6a7a8 Open and save 3D demos in Godot 4.3 stable (#1109) hai 4 meses
..
models 5646c6a7a8 Open and save 3D demos in Godot 4.3 stable (#1109) hai 4 meses
player bac1e69164 Use static typing in all demos (#1063) hai 7 meses
screenshots 1d5184e235 Update most demos for Godot 4.0.beta10 (#782) %!s(int64=2) %!d(string=hai) anos
README.md 16d8ba09fb Replace instances of KinematicBody with CharacteBody in READMEs hai 5 meses
cube_rigidbody.tscn 1d5184e235 Update most demos for Godot 4.0.beta10 (#782) %!s(int64=2) %!d(string=hai) anos
cubelib.tres 5646c6a7a8 Open and save 3D demos in Godot 4.3 stable (#1109) hai 4 meses
icon.webp 63d1cd9a60 Use 128×128 WebP icons for all demos (#885) hai 1 ano
icon.webp.import 63d1cd9a60 Use 128×128 WebP icons for all demos (#885) hai 1 ano
level.gd bac1e69164 Use static typing in all demos (#1063) hai 7 meses
level.tscn bac1e69164 Use static typing in all demos (#1063) hai 7 meses
project.godot 5646c6a7a8 Open and save 3D demos in Godot 4.3 stable (#1109) hai 4 meses

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

Screenshots

Screenshot