CollisionShape3D

Inherits:Node3D<Node<Object

A node that provides aShape3D to aCollisionObject3D parent.

Description

A node that provides aShape3D to aCollisionObject3D parent and allows to edit it. This can give a detection shape to anArea3D or turn aPhysicsBody3D into a solid object.

Warning: A non-uniformly scaledCollisionShape3D will likely not behave as expected. Make sure to keep its scale the same on all axes and adjust itsshape resource instead.

Tutorials

Properties

Color

debug_color

Color(0,0,0,0)

bool

debug_fill

true

bool

disabled

false

Shape3D

shape

Methods

void

make_convex_from_siblings()

void

resource_changed(resource:Resource)


Property Descriptions

Colordebug_color =Color(0,0,0,0)🔗

The collision shape color that is displayed in the editor, or in the running project ifDebug > Visible Collision Shapes is checked at the top of the editor.

Note: The default value isProjectSettings.debug/shapes/collision/shape_color. TheColor(0,0,0,0) value documented here is a placeholder, and not the actual default debug color.


booldebug_fill =true🔗

Iftrue, when the shape is displayed, it will show a solid fill color in addition to its wireframe.


booldisabled =false🔗

A disabled collision shape has no effect in the world.


Shape3Dshape🔗

The actual shape owned by this collision shape.


Method Descriptions

voidmake_convex_from_siblings()🔗

Sets the collision shape's shape to the addition of all its convexedMeshInstance3D siblings geometry.


voidresource_changed(resource:Resource)🔗

Deprecated: UseResource.changed instead.

This method does nothing.


User-contributed notes

Please read theUser-contributed notes policy before submitting a comment.