Skip to content

class_collisionobject2d

reduz edited this page Feb 23, 2014 · 9 revisions

CollisionObject2D

Inherits: Node2D\n\n

Brief Description

Base node for 2D collisionables.

Member Functions

Description

CollisionObject2D is the base class for 2D physics collisionables. They can hold any number of 2D collision shapes. Usually, they are edited by placing CollisionBody2D and CollisionPolygon2D nodes as children. Such nodes are for reference ant not present outside the editor, so code should use the regular shape API.

Member Function Description

  • int ** get_shape_count ** ( ) const \ Return the amount of shapes in the collision body.
  • void ** set_shape ** ( int shape_idx, Shape shape ) \ Change a shape in the collision body.
  • void ** remove_shape ** ( int shape_idx ) \ Remove the shape in the given index.

Clone this wiki locally