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...
CollisionShape2D
Eredita: Node2D < CanvasItem < Node < Object
Un nodo che fornisce uno Shape2D a un CollisionObject2D genitore.
Descrizione
A node that provides a Shape2D to a CollisionObject2D parent and allows it to be edited. This can give a detection shape to an Area2D or turn a PhysicsBody2D into a solid object.
Tutorial
Proprietà
|
||
|
||
|
||
|
||
|
||
Descrizioni delle proprietà
Color debug_color = Color(0, 0, 0, 0) 🔗
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.
Una forma di collisione disabilitata non ha alcun effetto nel mondo. Questa proprietà dovrebbe essere modificata con Object.set_deferred().
bool one_way_collision = false 🔗
Sets whether this collision shape should only detect collision on one side (top or bottom).
Note: This property has no effect if this CollisionShape2D is a child of an Area2D node.
Note: The one way collision direction can be configured by setting one_way_collision_direction.
Vector2 one_way_collision_direction = Vector2(0, 1) 🔗
The direction used for one-way collision.
float one_way_collision_margin = 1.0 🔗
Il margine utilizzato per la collisione a senso unico (in pixel). Valori più alti renderanno la forma più spessa e funzioneranno meglio per i collisori che entrano nella forma ad alta velocità.
La forma reale appartenente a questa forma di collisione.