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...
SoftBody¶
Inherits: MeshInstance < GeometryInstance < VisualInstance < CullInstance < Spatial < Node < Object
Un cuerpo físico de malla suave.
Descripción¶
Un cuerpo físico deformable. Se usa para crear objetos elásticos o deformables como tela, goma u otros materiales flexibles.
Tutoriales¶
Propiedades¶
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Métodos¶
void |
add_collision_exception_with ( Node body ) |
get_collision_layer_bit ( int bit ) const |
|
get_collision_mask_bit ( int bit ) const |
|
get_point_transform ( int point_index ) |
|
is_point_pinned ( int point_index ) const |
|
void |
remove_collision_exception_with ( Node body ) |
void |
set_collision_layer_bit ( int bit, bool value ) |
void |
set_collision_mask_bit ( int bit, bool value ) |
void |
set_point_pinned ( int point_index, bool pinned, NodePath attachment_path=NodePath("") ) |
Descripciones de Propiedades¶
float areaAngular_stiffness
Default |
|
Setter |
set_areaAngular_stiffness(value) |
Getter |
get_areaAngular_stiffness() |
int collision_layer
Default |
|
Setter |
set_collision_layer(value) |
Getter |
get_collision_layer() |
The physics layers this SoftBody is in.
Collidable objects can exist in any of 32 different layers. These layers work like a tagging system, and are not visual. A collidable can use these layers to select with which objects it can collide, using the collision_mask property.
A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A. See Collision layers and masks in the documentation for more information.
int collision_mask
Default |
|
Setter |
set_collision_mask(value) |
Getter |
get_collision_mask() |
The physics layers this SoftBody scans for collisions. See Collision layers and masks in the documentation for more information.
float damping_coefficient
Default |
|
Setter |
set_damping_coefficient(value) |
Getter |
get_damping_coefficient() |
float drag_coefficient
Default |
|
Setter |
set_drag_coefficient(value) |
Getter |
get_drag_coefficient() |
float linear_stiffness
Default |
|
Setter |
set_linear_stiffness(value) |
Getter |
get_linear_stiffness() |
NodePath parent_collision_ignore
Default |
|
Setter |
set_parent_collision_ignore(value) |
Getter |
get_parent_collision_ignore() |
NodePath to a CollisionObject this SoftBody should avoid clipping.
bool physics_enabled
Default |
|
Setter |
set_physics_enabled(value) |
Getter |
is_physics_enabled() |
If true
, the SoftBody
is simulated in physics. Can be set to false
to pause the physics simulation.
float pose_matching_coefficient
Default |
|
Setter |
set_pose_matching_coefficient(value) |
Getter |
get_pose_matching_coefficient() |
float pressure_coefficient
Default |
|
Setter |
set_pressure_coefficient(value) |
Getter |
get_pressure_coefficient() |
bool ray_pickable
Default |
|
Setter |
set_ray_pickable(value) |
Getter |
is_ray_pickable() |
If true
, the SoftBody
will respond to RayCasts.
int simulation_precision
Default |
|
Setter |
set_simulation_precision(value) |
Getter |
get_simulation_precision() |
Aumentar este valor mejorará la simulación resultante, pero puede afectar al rendimiento. Usar con cuidado.
float total_mass
Default |
|
Setter |
set_total_mass(value) |
Getter |
get_total_mass() |
The SoftBody's mass.
float volume_stiffness
Default |
|
Setter |
set_volume_stiffness(value) |
Getter |
get_volume_stiffness() |
Descripciones de Métodos¶
void add_collision_exception_with ( Node body )
Añade un cuerpo a la lista de cuerpos con los que este cuerpo no puede colisionar.
Array get_collision_exceptions ( )
Devuelve un conjunto de nodos que se añadieron como excepciones de colisión para este cuerpo.
Devuelve un bit individual de la máscara de colisión.
Devuelve un bit individual de la máscara de colisión.
Returns local translation of a vertex in the surface array.
Returns true
if vertex is set to pinned.
void remove_collision_exception_with ( Node body )
Quita un cuerpo de la lista de cuerpos con los que este cuerpo no puede colisionar.
Establece bits individuales en la máscara de la capa. Utilízala si sólo necesitas cambiar el valor de una capa.
Establece bits individuales en la máscara de colisión. Utilízala si sólo necesitas cambiar el valor de una capa.
Sets the pinned state of a surface vertex. When set to true
, the optional attachment_path
can define a Spatial the pinned vertex will be attached to.