Replace instances of KinematicBody with CharacteBody in READMEs

KinematicBody was replaced by CharacterBody in Godot 4.0.

This also adds the 3D suffix to 3D physics classes.
This commit is contained in:
Hugo Locurcio
2024-07-12 23:04:39 +02:00
parent 7223aec001
commit 16d8ba09fb
8 changed files with 14 additions and 14 deletions

View File

@@ -11,8 +11,8 @@ Check out this demo on the asset library: https://godotengine.org/asset-library/
## How does it work?
This demo uses a [`KinematicBody`](https://docs.godotengine.org/en/latest/classes/class_kinematicbody.html)
for the player, and [`StaticBody`](https://docs.godotengine.org/en/latest/classes/class_staticbody.html)
This demo uses a [`CharacterBody3D`](https://docs.godotengine.org/en/latest/classes/class_characterbody3d.html)
for the player, and [`StaticBody3D`](https://docs.godotengine.org/en/latest/classes/class_staticbody3d.html)
for the level. Each has colliders, the player moves itself via
`move_and_slide()` in `_physics_process()`, and collides with the level.

View File

@@ -3,7 +3,7 @@
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.
impossible with a CharacterBody.
Language: GDScript
@@ -13,8 +13,8 @@ Check out this demo on the asset library: https://godotengine.org/asset-library/
## How does it work?
This demo uses a [`RigidBody`](https://docs.godotengine.org/en/stable/classes/class_rigidbody.html)
for the player, and [`StaticBody`](https://docs.godotengine.org/en/latest/classes/class_staticbody.html)
This demo uses a [`RigidBody3D`](https://docs.godotengine.org/en/stable/classes/class_rigidbody3d.html)
for the player, and [`StaticBody3D`](https://docs.godotengine.org/en/latest/classes/class_staticbody3d.html)
for the level. Each has colliders, the player moves itself via
`apply_central_impulse()` in `_physics_process()`, and collides with the level.

View File

@@ -26,11 +26,11 @@ Check out this demo on the asset library: https://godotengine.org/asset-library/
## How does it work?
The base vehicle uses a
[`VehicleBody`](https://docs.godotengine.org/en/latest/classes/class_vehiclebody.html)
[`VehicleBody3D`](https://docs.godotengine.org/en/latest/classes/class_vehiclebody3d.html)
node. The trailer truck is tied together using a
[`ConeJointTwist`](https://docs.godotengine.org/en/latest/classes/class_conetwistjoint.html)
node, and the tow truck is tried together using a chain made of
[`RigidBody`](https://docs.godotengine.org/en/latest/classes/class_rigidbody.html)
[`RigidBody3D`](https://docs.godotengine.org/en/latest/classes/class_rigidbody3d.html)
nodes which are pinned together using
[`PinJoint`](https://docs.godotengine.org/en/latest/classes/class_pinjoint.html) nodes.

View File

@@ -12,7 +12,7 @@ Check out this demo on the asset library: https://godotengine.org/asset-library/
## How does it work?
Each chunk is a
[`StaticBody`](https://docs.godotengine.org/en/latest/classes/class_staticbody.html)
[`StaticBody3D`](https://docs.godotengine.org/en/latest/classes/class_staticbody3d.html)
with each block having its own
[`CollisionShape`](https://docs.godotengine.org/en/latest/classes/class_collisionshape.html)
for collisions. The meshes are created using