Collision data for KinematicBody collisions.
    public class KinematicCollision : Reference

Contains collision data for KinematicBody collisions. When a KinematicBody is moved using KinematicBody.MoveAndCollide(Godot.Vector3, bool, bool, bool), 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.

Inheritance Chain


    public KinematicCollision()


    public Object Collider { get; }

The colliding body.

    public ulong ColliderId { get; }

The colliding body’s unique RID.

    public object ColliderMetadata { get; }

The colliding body’s metadata. See Object.

    public Object ColliderShape { get; }

The colliding body’s shape.

    public int ColliderShapeIndex { get; }

The colliding shape’s index. See CollisionObject.

    public Vector3 ColliderVelocity { get; }

The colliding object’s velocity.

    public Object LocalShape { get; }

The moving object’s colliding shape.

    public Vector3 Normal { get; }

The colliding body’s shape’s normal at the point of collision.

    public Vector3 Position { get; }

The point of collision.

    public Vector3 Remainder { get; }

The moving object’s remaining movement vector.

    public Vector3 Travel { get; }

The distance the moving object traveled before collision.


    [Obsolete("GetCollider is deprecated. Use the Collider property instead.")]
    public Object GetCollider()

Getter for Collider

    [Obsolete("GetColliderId is deprecated. Use the ColliderId property instead.")]
    public ulong GetColliderId()

    [Obsolete("GetColliderMetadata is deprecated. Use the ColliderMetadata property instead.")]
    public object GetColliderMetadata()

Getter for ColliderMetadata

    [Obsolete("GetColliderShape is deprecated. Use the ColliderShape property instead.")]
    public Object GetColliderShape()

Getter for ColliderShape

    [Obsolete("GetColliderShapeIndex is deprecated. Use the ColliderShapeIndex property instead.")]
    public int GetColliderShapeIndex()

Getter for ColliderShapeIndex

    [Obsolete("GetColliderVelocity is deprecated. Use the ColliderVelocity property instead.")]
    public Vector3 GetColliderVelocity()

Getter for ColliderVelocity

    [Obsolete("GetLocalShape is deprecated. Use the LocalShape property instead.")]
    public Object GetLocalShape()

Getter for LocalShape

    [Obsolete("GetNormal is deprecated. Use the Normal property instead.")]
    public Vector3 GetNormal()

Getter for Normal

    [Obsolete("GetPosition is deprecated. Use the Position property instead.")]
    public Vector3 GetPosition()

Getter for Position

    [Obsolete("GetRemainder is deprecated. Use the Remainder property instead.")]
    public Vector3 GetRemainder()

Getter for Remainder

    [Obsolete("GetTravel is deprecated. Use the Travel property instead.")]
    public Vector3 GetTravel()

Getter for Travel