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.

Shape3D

Eredita: Resource < RefCounted < Object

Ereditato da: BoxShape3D, CapsuleShape3D, ConcavePolygonShape3D, ConvexPolygonShape3D, CylinderShape3D, HeightMapShape3D, SeparationRayShape3D, SphereShape3D, WorldBoundaryShape3D

Classe di base astratta per forme 3D utilizzate per le collisioni fisiche.

Descrizione

Classe di base astratta per tutte le forme 3D, progettata per l'uso in fisica.

Prestazioni: Le forme primitive, in particolare SphereShape3D, sono veloci da verificare per le collisioni. ConvexPolygonShape3D e HeightMapShape3D sono più lente, e ConcavePolygonShape3D è la più lenta.

Tutorial

Proprietà

float

custom_solver_bias

0.0

float

margin

0.04

Metodi

ArrayMesh

get_debug_mesh()


Descrizioni delle proprietà

float custom_solver_bias = 0.0 🔗

  • void set_custom_solver_bias(value: float)

  • float get_custom_solver_bias()

The shape's custom solver bias. Defines how much bodies react to enforce contact separation when this shape is involved.

When set to 0, the default value from ProjectSettings.physics/3d/solver/default_contact_bias is used.

Note: custom_solver_bias is only effective when using GodotPhysics3D. It has no effect when using Jolt Physics.


float margin = 0.04 🔗

  • void set_margin(value: float)

  • float get_margin()

Il margine di collisione per la forma. Non è utilizzato in Godot Physics.

I margini di collisione consentono di rilevare le collisioni in modo più efficiente aggiungendo un ulteriore guscio attorno alle forme. Gli algoritmi di collisione sono più costosi quando gli oggetti si sovrappongono per più del loro margine, quindi un valore più alto per i margini è migliore per le prestazioni, a scapito della precisione attorno ai bordi poiché li rende meno nitidi.


Descrizioni dei metodi

ArrayMesh get_debug_mesh() 🔗

Restituisce l'ArrayMesh utilizzato per disegnare la collisione di debug per questo Shape3D.