Base node for collision objects.
    public abstract class CollisionObject : Spatial

CollisionObject is the base class for physics objects. It can hold any number of collision Shapes. Each shape must be assigned to a shape owner. The CollisionObject can have any number of shape owners. Shape owners are not nodes and do not appear in the editor, but are accessible through code using the shape_owner_* methods.

Inheritance Chain

Derived Classes


    "input_event" (Node camera, InputEvent event, Vector3 click_position, Vector3 click_normal, int shape_idx)

Emitted when _InputEvent(Godot.Object, Godot.InputEvent, Godot.Vector3, Godot.Vector3, int) receives an event. See its description for details.

    "mouse_entered" ()

Emitted when the mouse pointer enters any of this object’s shapes.

    "mouse_exited" ()

Emitted when the mouse pointer exits all this object’s shapes.


    public bool InputCaptureOnDrag { get; set; }

If true, the CollisionObject will continue to receive input events as the mouse is dragged across its shapes.

    public bool InputRayPickable { get; set; }

If true, the CollisionObject’s shapes will respond to RayCasts.


    public virtual void _InputEvent(Object camera, InputEvent @event, Vector3 clickPosition, Vector3 clickNormal, int shapeIdx)

Accepts unhandled InputEvents. clickPosition is the clicked location in world space and clickNormal is the normal vector extending from the clicked surface of the Shape at shapeIdx. Connect to the input_event signal to easily pick up these events.

    public uint CreateShapeOwner(Object owner)

    [Obsolete("GetCaptureInputOnDrag is deprecated. Use the InputCaptureOnDrag property instead.")]
    public bool GetCaptureInputOnDrag()

Getter for InputCaptureOnDrag

    public RID GetRid()

Returns the object’s RID.

    public Godot.Collections.Array GetShapeOwners()

Returns an Array of owner_id identifiers. You can use these ids in other methods that take owner_id as an argument.

    [Obsolete("IsRayPickable is deprecated. Use the InputRayPickable property instead.")]
    public bool IsRayPickable()

Getter for InputRayPickable

    public bool IsShapeOwnerDisabled(uint ownerId)

    public void RemoveShapeOwner(uint ownerId)

    [Obsolete("SetCaptureInputOnDrag is deprecated. Use the InputCaptureOnDrag property instead.")]
    public void SetCaptureInputOnDrag(bool enable)

Setter for InputCaptureOnDrag

    [Obsolete("SetRayPickable is deprecated. Use the InputRayPickable property instead.")]
    public void SetRayPickable(bool rayPickable)

Setter for InputRayPickable

    public uint ShapeFindOwner(int shapeIndex)

    public void ShapeOwnerAddShape(uint ownerId, Shape shape)

    public void ShapeOwnerClearShapes(uint ownerId)

    public Object ShapeOwnerGetOwner(uint ownerId)

    public Shape ShapeOwnerGetShape(uint ownerId, int shapeId)

    public int ShapeOwnerGetShapeCount(uint ownerId)

    public int ShapeOwnerGetShapeIndex(uint ownerId, int shapeId)

    public Transform ShapeOwnerGetTransform(uint ownerId)

    public void ShapeOwnerRemoveShape(uint ownerId, int shapeId)

    public void ShapeOwnerSetDisabled(uint ownerId, bool disabled)

    public void ShapeOwnerSetTransform(uint ownerId, Transform transform)