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.

CollisionShape3D

Eredita: Node3D < Node < Object

Un nodo che fornisce uno Shape3D a un CollisionObject3D genitore.

Descrizione

A node that provides a Shape3D to a CollisionObject3D parent and allows it to be edited. This can give a detection shape to an Area3D or turn a PhysicsBody3D into a solid object.

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

Tutorial

Proprietà

Color

debug_color

Color(0, 0, 0, 0)

bool

debug_fill

true

bool

disabled

false

Shape3D

shape

Metodi

void

make_convex_from_siblings()

void

resource_changed(resource: Resource)


Descrizioni delle proprietà

Color debug_color = Color(0, 0, 0, 0) 🔗

  • void set_debug_color(value: Color)

  • Color get_debug_color()

Il colore di debug della forma di collisione che è visualizzato nell'editor, o nel progetto in esecuzione se Debug > Forme di collisione visibili.

Nota: Il valore predefinito è ProjectSettings.debug/shapes/collision/shape_color. Il valore Color(0, 0, 0, 1) documentato qui è un segnaposto e non il colore di debug predefinito effettivo.


bool debug_fill = true 🔗

  • void set_enable_debug_fill(value: bool)

  • bool get_enable_debug_fill()

Se true, quando la forma è visualizzata, mostrerà un colore solido di riempimento oltre al suo wireframe.


bool disabled = false 🔗

  • void set_disabled(value: bool)

  • bool is_disabled()

Una forma di collisione disabilitata non ha alcun effetto nel mondo. Questa proprietà dovrebbe essere modificata con Object.set_deferred().


Shape3D shape 🔗

La forma reale appartenente a questa forma di collisione.


Descrizioni dei metodi

void make_convex_from_siblings() 🔗

Imposta la forma di collisione aggiungendo tutte le geometrie dei suoi fratelli MeshInstance3D convessi .


void resource_changed(resource: Resource) 🔗

Deprecato: Use Resource.changed instead.

Questo metodo non fa nulla.