.. 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 KinematicBody collisions.

Member Variables
----------------

  .. _class_KinematicCollision_collider:

- :ref:`Object<class_object>` **collider** - The colliding body.

  .. _class_KinematicCollision_collider_id:

- :ref:`int<class_int>` **collider_id** - The colliding body's unique :ref:`RID<class_rid>`.

  .. _class_KinematicCollision_collider_metadata:

- :ref:`Variant<class_variant>` **collider_metadata** - The colliding body's metadata. See :ref:`Object<class_object>`.

  .. _class_KinematicCollision_collider_shape:

- :ref:`Object<class_object>` **collider_shape** - The colliding body's shape.

  .. _class_KinematicCollision_collider_shape_index:

- :ref:`int<class_int>` **collider_shape_index** - The colliding shape's index. See :ref:`CollisionObject<class_collisionobject>`.

  .. _class_KinematicCollision_collider_velocity:

- :ref:`Vector3<class_vector3>` **collider_velocity** - The colliding object's velocity.

  .. _class_KinematicCollision_local_shape:

- :ref:`Object<class_object>` **local_shape** - The moving object's colliding shape.

  .. _class_KinematicCollision_normal:

- :ref:`Vector3<class_vector3>` **normal** - The colliding body's shape's normal at the point of collision.

  .. _class_KinematicCollision_position:

- :ref:`Vector3<class_vector3>` **position** - The point of collision.

  .. _class_KinematicCollision_remainder:

- :ref:`Vector3<class_vector3>` **remainder** - The moving object's remaining movement vector.

  .. _class_KinematicCollision_travel:

- :ref:`Vector3<class_vector3>` **travel** - The distance the moving object traveled before collision.


Description
-----------

Contains collision data for KinematicBody collisions. When a :ref:`KinematicBody<class_kinematicbody>` is moved using :ref:`KinematicBody.move_and_collide<class_KinematicBody_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.

