96 lines
3.9 KiB
Text
96 lines
3.9 KiB
Text
|
:github_url: hide
|
||
|
|
||
|
.. DO NOT EDIT THIS FILE!!!
|
||
|
.. Generated automatically from Godot engine sources.
|
||
|
.. Generator: https://github.com/godotengine/godot/tree/3.6/doc/tools/make_rst.py.
|
||
|
.. XML source: https://github.com/godotengine/godot/tree/3.6/doc/classes/PhysicsBody.xml.
|
||
|
|
||
|
.. _class_PhysicsBody:
|
||
|
|
||
|
PhysicsBody
|
||
|
===========
|
||
|
|
||
|
**Inherits:** :ref:`CollisionObject<class_CollisionObject>` **<** :ref:`Spatial<class_Spatial>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||
|
|
||
|
**Inherited By:** :ref:`KinematicBody<class_KinematicBody>`, :ref:`PhysicalBone<class_PhysicalBone>`, :ref:`RigidBody<class_RigidBody>`, :ref:`StaticBody<class_StaticBody>`
|
||
|
|
||
|
Base class for all objects affected by physics in 3D space.
|
||
|
|
||
|
.. rst-class:: classref-introduction-group
|
||
|
|
||
|
Description
|
||
|
-----------
|
||
|
|
||
|
PhysicsBody is an abstract base class for implementing a physics body. All \*Body types inherit from it.
|
||
|
|
||
|
\ **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.
|
||
|
|
||
|
.. rst-class:: classref-introduction-group
|
||
|
|
||
|
Tutorials
|
||
|
---------
|
||
|
|
||
|
- :doc:`../tutorials/physics/physics_introduction`
|
||
|
|
||
|
.. rst-class:: classref-reftable-group
|
||
|
|
||
|
Methods
|
||
|
-------
|
||
|
|
||
|
.. table::
|
||
|
:widths: auto
|
||
|
|
||
|
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
| void | :ref:`add_collision_exception_with<class_PhysicsBody_method_add_collision_exception_with>` **(** :ref:`Node<class_Node>` body **)** |
|
||
|
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
| :ref:`Array<class_Array>` | :ref:`get_collision_exceptions<class_PhysicsBody_method_get_collision_exceptions>` **(** **)** |
|
||
|
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
| void | :ref:`remove_collision_exception_with<class_PhysicsBody_method_remove_collision_exception_with>` **(** :ref:`Node<class_Node>` body **)** |
|
||
|
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
|
||
|
.. rst-class:: classref-section-separator
|
||
|
|
||
|
----
|
||
|
|
||
|
.. rst-class:: classref-descriptions-group
|
||
|
|
||
|
Method Descriptions
|
||
|
-------------------
|
||
|
|
||
|
.. _class_PhysicsBody_method_add_collision_exception_with:
|
||
|
|
||
|
.. rst-class:: classref-method
|
||
|
|
||
|
void **add_collision_exception_with** **(** :ref:`Node<class_Node>` body **)**
|
||
|
|
||
|
Adds a body to the list of bodies that this body can't collide with.
|
||
|
|
||
|
.. rst-class:: classref-item-separator
|
||
|
|
||
|
----
|
||
|
|
||
|
.. _class_PhysicsBody_method_get_collision_exceptions:
|
||
|
|
||
|
.. rst-class:: classref-method
|
||
|
|
||
|
:ref:`Array<class_Array>` **get_collision_exceptions** **(** **)**
|
||
|
|
||
|
Returns an array of nodes that were added as collision exceptions for this body.
|
||
|
|
||
|
.. rst-class:: classref-item-separator
|
||
|
|
||
|
----
|
||
|
|
||
|
.. _class_PhysicsBody_method_remove_collision_exception_with:
|
||
|
|
||
|
.. rst-class:: classref-method
|
||
|
|
||
|
void **remove_collision_exception_with** **(** :ref:`Node<class_Node>` body **)**
|
||
|
|
||
|
Removes a body from the list of bodies that this body can't collide with.
|
||
|
|
||
|
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||
|
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||
|
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||
|
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|