123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179 |
- .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
- .. DO NOT EDIT THIS FILE, but the KinematicCollision.xml source instead.
- .. The source is found in doc/classes or modules/<name>/doc_classes.
- .. _class_KinematicCollision:
- KinematicCollision
- ==================
- **Inherits:** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
- **Category:** Core
- Brief Description
- -----------------
- Collision data for :ref:`KinematicBody<class_KinematicBody>` collisions.
- Properties
- ----------
- +-------------------------------+-------------------------------------------------------------------------------------+--------------------+
- | :ref:`Object<class_Object>` | :ref:`collider<class_KinematicCollision_property_collider>` | |
- +-------------------------------+-------------------------------------------------------------------------------------+--------------------+
- | :ref:`int<class_int>` | :ref:`collider_id<class_KinematicCollision_property_collider_id>` | 0 |
- +-------------------------------+-------------------------------------------------------------------------------------+--------------------+
- | :ref:`Variant<class_Variant>` | :ref:`collider_metadata<class_KinematicCollision_property_collider_metadata>` | |
- +-------------------------------+-------------------------------------------------------------------------------------+--------------------+
- | :ref:`Object<class_Object>` | :ref:`collider_shape<class_KinematicCollision_property_collider_shape>` | |
- +-------------------------------+-------------------------------------------------------------------------------------+--------------------+
- | :ref:`int<class_int>` | :ref:`collider_shape_index<class_KinematicCollision_property_collider_shape_index>` | 0 |
- +-------------------------------+-------------------------------------------------------------------------------------+--------------------+
- | :ref:`Vector3<class_Vector3>` | :ref:`collider_velocity<class_KinematicCollision_property_collider_velocity>` | Vector3( 0, 0, 0 ) |
- +-------------------------------+-------------------------------------------------------------------------------------+--------------------+
- | :ref:`Object<class_Object>` | :ref:`local_shape<class_KinematicCollision_property_local_shape>` | |
- +-------------------------------+-------------------------------------------------------------------------------------+--------------------+
- | :ref:`Vector3<class_Vector3>` | :ref:`normal<class_KinematicCollision_property_normal>` | Vector3( 0, 0, 0 ) |
- +-------------------------------+-------------------------------------------------------------------------------------+--------------------+
- | :ref:`Vector3<class_Vector3>` | :ref:`position<class_KinematicCollision_property_position>` | Vector3( 0, 0, 0 ) |
- +-------------------------------+-------------------------------------------------------------------------------------+--------------------+
- | :ref:`Vector3<class_Vector3>` | :ref:`remainder<class_KinematicCollision_property_remainder>` | Vector3( 0, 0, 0 ) |
- +-------------------------------+-------------------------------------------------------------------------------------+--------------------+
- | :ref:`Vector3<class_Vector3>` | :ref:`travel<class_KinematicCollision_property_travel>` | Vector3( 0, 0, 0 ) |
- +-------------------------------+-------------------------------------------------------------------------------------+--------------------+
- Description
- -----------
- Contains collision data for :ref:`KinematicBody<class_KinematicBody>` collisions. When a :ref:`KinematicBody<class_KinematicBody>` is moved using :ref:`KinematicBody.move_and_collide<class_KinematicBody_method_move_and_collide>`, it stops if it detects a collision with another body. If a collision is detected, a KinematicCollision object is returned.
- This object contains information about the collision, including the colliding object, the remaining motion, and the collision position. This information can be used to calculate a collision response.
- Property Descriptions
- ---------------------
- .. _class_KinematicCollision_property_collider:
- - :ref:`Object<class_Object>` **collider**
- +----------+----------------+
- | *Getter* | get_collider() |
- +----------+----------------+
- The colliding body.
- .. _class_KinematicCollision_property_collider_id:
- - :ref:`int<class_int>` **collider_id**
- +-----------+-------------------+
- | *Default* | 0 |
- +-----------+-------------------+
- | *Getter* | get_collider_id() |
- +-----------+-------------------+
- The colliding body's unique :ref:`RID<class_RID>`.
- .. _class_KinematicCollision_property_collider_metadata:
- - :ref:`Variant<class_Variant>` **collider_metadata**
- +----------+-------------------------+
- | *Getter* | get_collider_metadata() |
- +----------+-------------------------+
- The colliding body's metadata. See :ref:`Object<class_Object>`.
- .. _class_KinematicCollision_property_collider_shape:
- - :ref:`Object<class_Object>` **collider_shape**
- +----------+----------------------+
- | *Getter* | get_collider_shape() |
- +----------+----------------------+
- The colliding body's shape.
- .. _class_KinematicCollision_property_collider_shape_index:
- - :ref:`int<class_int>` **collider_shape_index**
- +-----------+----------------------------+
- | *Default* | 0 |
- +-----------+----------------------------+
- | *Getter* | get_collider_shape_index() |
- +-----------+----------------------------+
- The colliding shape's index. See :ref:`CollisionObject<class_CollisionObject>`.
- .. _class_KinematicCollision_property_collider_velocity:
- - :ref:`Vector3<class_Vector3>` **collider_velocity**
- +-----------+-------------------------+
- | *Default* | Vector3( 0, 0, 0 ) |
- +-----------+-------------------------+
- | *Getter* | get_collider_velocity() |
- +-----------+-------------------------+
- The colliding object's velocity.
- .. _class_KinematicCollision_property_local_shape:
- - :ref:`Object<class_Object>` **local_shape**
- +----------+-------------------+
- | *Getter* | get_local_shape() |
- +----------+-------------------+
- The moving object's colliding shape.
- .. _class_KinematicCollision_property_normal:
- - :ref:`Vector3<class_Vector3>` **normal**
- +-----------+--------------------+
- | *Default* | Vector3( 0, 0, 0 ) |
- +-----------+--------------------+
- | *Getter* | get_normal() |
- +-----------+--------------------+
- The colliding body's shape's normal at the point of collision.
- .. _class_KinematicCollision_property_position:
- - :ref:`Vector3<class_Vector3>` **position**
- +-----------+--------------------+
- | *Default* | Vector3( 0, 0, 0 ) |
- +-----------+--------------------+
- | *Getter* | get_position() |
- +-----------+--------------------+
- The point of collision.
- .. _class_KinematicCollision_property_remainder:
- - :ref:`Vector3<class_Vector3>` **remainder**
- +-----------+--------------------+
- | *Default* | Vector3( 0, 0, 0 ) |
- +-----------+--------------------+
- | *Getter* | get_remainder() |
- +-----------+--------------------+
- The moving object's remaining movement vector.
- .. _class_KinematicCollision_property_travel:
- - :ref:`Vector3<class_Vector3>` **travel**
- +-----------+--------------------+
- | *Default* | Vector3( 0, 0, 0 ) |
- +-----------+--------------------+
- | *Getter* | get_travel() |
- +-----------+--------------------+
- The distance the moving object traveled before collision.
|