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...
StaticBody2D¶
Inherits: PhysicsBody2D < CollisionObject2D < Node2D < CanvasItem < Node < Object
Cuerpo estático para la física 2D.
Descripción¶
Cuerpo estático para la física 2D. Un StaticBody2D es un cuerpo que no está destinado a moverse. Es ideal para implementar objetos en el entorno, como paredes o plataformas.
Además, se puede establecer una velocidad lineal o angular constante para el cuerpo estático, que afectará a los cuerpos que colisionen como si se movieran (por ejemplo, una cinta transportadora).
Propiedades¶
|
||
|
||
Descripciones de Propiedades¶
float bounce
Setter |
set_bounce(value) |
Getter |
get_bounce() |
The body's bounciness. Values range from 0
(no bounce) to 1
(full bounciness).
Deprecated, use PhysicsMaterial.bounce instead via physics_material_override.
float constant_angular_velocity
Default |
|
Setter |
set_constant_angular_velocity(value) |
Getter |
get_constant_angular_velocity() |
La velocidad angular constante del cuerpo. Esto no rota el cuerpo, sino que afecta a los cuerpos en colisión, como si estuviera rotando.
Vector2 constant_linear_velocity
Default |
|
Setter |
set_constant_linear_velocity(value) |
Getter |
get_constant_linear_velocity() |
La velocidad lineal constante del cuerpo. Esto no mueve el cuerpo, sino que afecta a los cuerpos en colisión, como si se moviera.
float friction
Setter |
set_friction(value) |
Getter |
get_friction() |
The body's friction. Values range from 0
(no friction) to 1
(full friction).
Deprecated, use PhysicsMaterial.friction instead via physics_material_override.
PhysicsMaterial physics_material_override
Setter |
set_physics_material_override(value) |
Getter |
get_physics_material_override() |
El material de la física se sobreescribe para el cuerpo.
Si se asigna un material a esta propiedad, se utilizará en lugar de cualquier otro material de física, como por ejemplo uno heredado.