Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
CollisionObject2D¶
Inherits: Node2D < CanvasItem < Node < Object
Inherited By: Area2D, PhysicsBody2D
Abstract base class for 2D physics objects.
Description¶
Abstract base class for 2D physics objects. CollisionObject2D can hold any number of Shape2Ds 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.
Note: Only collisions between objects within the same canvas (Viewport canvas or CanvasLayer) are supported. The behavior of collisions between objects in different canvases is undefined.
Properties¶
|
||
|
||
|
||
|
||
|
Methods¶
void |
_input_event ( Viewport viewport, InputEvent event, int shape_idx ) virtual |
void |
_mouse_enter ( ) virtual |
void |
_mouse_exit ( ) virtual |
void |
_mouse_shape_enter ( int shape_idx ) virtual |
void |
_mouse_shape_exit ( int shape_idx ) virtual |
create_shape_owner ( Object owner ) |
|
get_collision_layer_value ( int layer_number ) const |
|
get_collision_mask_value ( int layer_number ) const |
|
get_rid ( ) const |
|
get_shape_owner_one_way_collision_margin ( int owner_id ) const |
|
get_shape_owners ( ) |
|
is_shape_owner_disabled ( int owner_id ) const |
|
is_shape_owner_one_way_collision_enabled ( int owner_id ) const |
|
void |
remove_shape_owner ( int owner_id ) |
void |
set_collision_layer_value ( int layer_number, |