classref: Sync with current master branch (543750a)

This commit is contained in:
Godot Organization
2023-06-03 03:19:05 +00:00
parent 2de3798d56
commit f9340bddb2
340 changed files with 1505 additions and 1258 deletions

View File

@@ -12,20 +12,16 @@ CharacterBody3D
**Inherits:** :ref:`PhysicsBody3D<class_PhysicsBody3D>` **<** :ref:`CollisionObject3D<class_CollisionObject3D>` **<** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
Specialized 3D physics body node for characters moved by script.
A 3D physics body specialized for characters moved by script.
.. rst-class:: classref-introduction-group
Description
-----------
Character bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all; to other types of bodies, such as a rigid body, these are the same as a :ref:`AnimatableBody3D<class_AnimatableBody3D>`. However, they have two main uses:
**CharacterBody3D** is a specialized class for physics bodies that are meant to be user-controlled. They are not affected by physics at all, but they affect other physics bodies in their path. They are mainly used to provide high-level API to move objects with wall and slope detection (:ref:`move_and_slide<class_CharacterBody3D_method_move_and_slide>` method) in addition to the general collision detection provided by :ref:`PhysicsBody3D.move_and_collide<class_PhysicsBody3D_method_move_and_collide>`. This makes it useful for highly configurable physics bodies that must move in specific ways and collide with the world, as is often the case with user-controlled characters.
\ *Kinematic characters:* Character bodies have an API for moving objects with walls and slopes detection (:ref:`move_and_slide<class_CharacterBody3D_method_move_and_slide>` method), in addition to collision detection (also done with :ref:`PhysicsBody3D.move_and_collide<class_PhysicsBody3D_method_move_and_collide>`). This makes them really useful to implement characters that move in specific ways and collide with the world, but don't require advanced physics.
\ *Kinematic motion:* Character bodies can also be used for kinematic motion (same functionality as :ref:`AnimatableBody3D<class_AnimatableBody3D>`), which allows them to be moved by code and push other bodies on their path.
\ **Warning:** With a non-uniform scale this node will probably not function as expected. Please make sure to keep its scale uniform (i.e. the same on all axes), and change the size(s) of its collision shape(s) instead.
For game objects that don't require complex movement or collision detection, such as moving platforms, :ref:`AnimatableBody3D<class_AnimatableBody3D>` is simpler to configure.
.. rst-class:: classref-introduction-group