Static body for 2D Physics.
    public class StaticBody2D : PhysicsBody2D

Static body for 2D Physics. A StaticBody2D is a body that is not intended to move. It is ideal for implementing objects in the environment, such as walls or platforms.

Additionally, a constant linear or angular velocity can be set for the static body, which will affect colliding bodies as if it were moving (for example, a conveyor belt).

Inheritance Chain


    public StaticBody2D()


    public float Bounce { get; set; }

The body’s bounciness. Values range from 0 (no bounce) to 1 (full bounciness).

    public float ConstantAngularVelocity { get; set; }

Constant angular velocity for the body. This does not rotate the body, but affects colliding bodies, as if it were rotating.

    public Vector2 ConstantLinearVelocity { get; set; }

Constant linear velocity for the body. This does not move the body, but affects colliding bodies, as if it were moving.

    public float Friction { get; set; }

The body’s friction. Values range from 0 (no friction) to 1 (full friction).

    public PhysicsMaterial PhysicsMaterialOverride { get; set; }


    public float GetBounce()

Getter for Bounce

    public float GetConstantAngularVelocity()

Getter for ConstantAngularVelocity

    public Vector2 GetConstantLinearVelocity()

Getter for ConstantLinearVelocity

    public float GetFriction()

Getter for Friction

    public PhysicsMaterial GetPhysicsMaterialOverride()

Getter for PhysicsMaterialOverride

    public void SetBounce(float bounce)

Setter for Bounce

    public void SetConstantAngularVelocity(float vel)

Setter for ConstantAngularVelocity

    public void SetConstantLinearVelocity(Vector2 vel)

Setter for ConstantLinearVelocity

    public void SetFriction(float friction)

Setter for Friction

    public void SetPhysicsMaterialOverride(PhysicsMaterial physicsMaterialOverride)

Setter for PhysicsMaterialOverride