Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

CollisionObject3D

Inherits: Node3D < Node < Object

Inherited By: Area3D, PhysicsBody3D

Abstract base class for 3D physics objects.

Description

Abstract base class for 3D physics objects. CollisionObject3D can hold any number of Shape3Ds for collision. Each shape must be assigned to a shape owner. Shape owners are not nodes and do not appear in the editor, but are accessible through code using the shape_owner_* methods.

Warning: With a non-uniform scale, this node will likely not behave as expected. It is advised to keep its scale the same on all axes and adjust its collision shape(s) instead.

Properties

int

collision_layer

1

int

collision_mask

1

float

collision_priority

1.0

DisableMode

disable_mode

0

bool

input_capture_on_drag

false

bool

input_ray_pickable

true

Methods

void

_input_event ( Camera3D camera, InputEvent event, Vector3 position, Vector3 normal, int shape_idx ) virtual

void

_mouse_enter ( ) virtual

void

_mouse_exit ( ) virtual

int

create_shape_owner ( Object owner )

bool

get_collision_layer_value ( int layer_number ) const

bool

get_collision_mask_value ( int layer_number ) const

RID

get_rid ( ) const

PackedInt32Array

get_shape_owners ( )

bool