StaticBody2D
Hereda: PhysicsBody2D < CollisionObject2D < Node2D < CanvasItem < Node < Object
Heredado por: AnimatableBody2D
Un cuerpo físico 2D que no puede ser movido por fuerzas externas. Cuando se mueve manualmente, no afecta a otros cuerpos en su camino.
Descripción
A static 2D physics body. It can't be moved by external forces or contacts, but can be moved manually by other means such as code, AnimationMixers (with AnimationMixer.callback_mode_process set to AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS), and RemoteTransform2D.
When StaticBody2D is moved, it is teleported to its new position without affecting other physics bodies in its path. If this is not desired, use AnimatableBody2D instead.
StaticBody2D is useful for completely static objects like floors and walls, as well as moving surfaces like conveyor belts and circular revolving platforms (by using constant_linear_velocity and constant_angular_velocity).
Tutoriales
Propiedades
|
||
|
||
Descripciones de Propiedades
float constant_angular_velocity = 0.0 🔗
La velocidad angular constante del cuerpo. Esto no rota el cuerpo, pero afecta a los cuerpos que toca, como si estuviera rotando.
Vector2 constant_linear_velocity = Vector2(0, 0) 🔗
La velocidad lineal constante del cuerpo. Esto no mueve el cuerpo, pero afecta a los cuerpos que toca, como si se estuviera moviendo.
PhysicsMaterial physics_material_override 🔗
void set_physics_material_override(value: PhysicsMaterial)
PhysicsMaterial get_physics_material_override()
El material de la física se sobrescribe 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.