Skip to content

Commit

Permalink
Replace instances of KinematicBody with CharacteBody in READMEs
Browse files Browse the repository at this point in the history
KinematicBody was replaced by CharacterBody in Godot 4.0.

This also adds the 3D suffix to 3D physics classes.
  • Loading branch information
Calinou committed Jul 12, 2024
1 parent 7223aec commit 16d8ba0
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion 2d/kinematic_character/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Kinematic Character 2D

Example of how to make a kinematic character controller in 2D using
[`KinematicBody2D`](https://docs.godotengine.org/en/latest/classes/class_kinematicbody2d.html).
[`CharacterBody2D`](https://docs.godotengine.org/en/latest/classes/class_characterbody2d.html).
The character moves around, is affected by moving platforms,
can jump through one-way collision platforms, etc.

Expand Down
2 changes: 1 addition & 1 deletion 2d/platformer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Check out this demo on the asset library: https://godotengine.org/asset-library/

## Features

- Side-scrolling player controller using [`KinematicBody2D`](https://docs.godotengine.org/en/latest/classes/class_kinematicbody2d.html).
- Side-scrolling player controller using [`CharacterBody2D`](https://docs.godotengine.org/en/latest/classes/class_characterbody2d.html).
- Can walk on and snap to slopes.
- Can shoot, including while jumping.
- Enemies that crawl on the floor and change direction when they encounter an obstacle.
Expand Down
4 changes: 2 additions & 2 deletions 3d/kinematic_character/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
6 changes: 3 additions & 3 deletions 3d/rigidbody_character/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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.

Expand Down
4 changes: 2 additions & 2 deletions 3d/truck_town/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion 3d/voxel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions misc/2.5d/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ Check out this demo on the asset library: https://godotengine.org/asset-library/

Custom node types are added in a Godot plugin to allow 2.5D objects. Node25D serves as the base for all 2.5D objects. Its first child must be a 3D Spatial, which is used to calculate its position. Then, add a 2D Sprite (or similar) to display the object.

Inside of Node25D, a 2.5D transformation matrix made of three `Vector2`s is used to calculate the 2D position from the 3D position. For getting a 3D position, this project uses KinematicBody and StaticBody (3D), but these only exist for math - the camera is 2D and all sprites are 2D. You are able to use any Spatial node for math.
Inside of Node25D, a 2.5D transformation matrix made of three `Vector2`s is used to calculate the 2D position from the 3D position. For getting a 3D position, this project uses CharacterBody and StaticBody (3D), but these only exist for math - the camera is 2D and all sprites are 2D. You are able to use any Spatial node for math.

Several view modes are implemented, including top down, front side, 45 degree, isometric, and two oblique modes. To implement a different view angle, all you need to do is create a new set of basis vectors in Node25D, use it on all instances, and of course create sprites to display that object in 2D.

The plugin also adds YSort25D to sort Node25D nodes, and ShadowMath25D for calculating a shadow (a simple KinematicBody that tries to cast downward).
The plugin also adds YSort25D to sort Node25D nodes, and ShadowMath25D for calculating a shadow (a simple CharacterBody that tries to cast downward).

## Screenshots

Expand Down
4 changes: 2 additions & 2 deletions mono/2.5d/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ Note: There is a GDScript version available [here](https://github.com/godotengin

Custom node types are added in a Godot plugin to allow 2.5D objects. Node25D serves as the base for all 2.5D objects. Its first child must be a 3D Spatial, which is used to calculate its position. Then, add a 2D Sprite (or similar) to display the object.

Inside of Node25D, new structs called Basis25D and Transform25D are used to calculate the 2D position from the 3D position. For getting a 3D position, this project uses KinematicBody and StaticBody (3D), but these only exist for math - the camera is 2D and all sprites are 2D. You are able to use any Spatial node for math.
Inside of Node25D, new structs called Basis25D and Transform25D are used to calculate the 2D position from the 3D position. For getting a 3D position, this project uses CharacterBody and StaticBody (3D), but these only exist for math - the camera is 2D and all sprites are 2D. You are able to use any Spatial node for math.

Several view modes are implemented, including top down, front side, 45 degree, isometric, and two oblique modes. To implement a different view angle, all you need to do is create a new Basis25D, use it in all your Node25D transforms, and of course create sprites to display that object in 2D.

The plugin also adds YSort25D to sort Node25D nodes, and ShadowMath25D for calculating a shadow (a simple KinematicBody that tries to cast downward).
The plugin also adds YSort25D to sort Node25D nodes, and ShadowMath25D for calculating a shadow (a simple CharacterBody that tries to cast downward).

## Screenshots

Expand Down

0 comments on commit 16d8ba0

Please sign in to comment.