CollisionShape

Inherits: Spatial < Node < Object

Category: Core

Brief Description

Node that represents collision shape data in 3D space.

Member Functions

void make_convex_from_brothers ( )
void resource_changed ( Resource resource )

Member Variables

  • bool disabled - A disabled collision shape has no effect in the world.
  • Shape shape - The actual shape owned by this collision shape.

Description

Editor facility for creating and editing collision shapes in 3D space. You can use this node to represent all sorts of collision shapes, for example, add this to an Area to give it a detection shape, or add it to a PhysicsBody to give create solid object. IMPORTANT: this is an Editor-only helper to create shapes, use get_shape to get the actual shape.

Member Function Description

  • void make_convex_from_brothers ( )

Sets the collision shape’s shape to the addition of all its convexed MeshInstance siblings geometry.

  • void resource_changed ( Resource resource )

If this method exists within a script it will be called whenever the shape resource has been modified.