public abstract class PhysicsDirectBodyState : Object

Inheritance Chain

Properties

    public Vector3 AngularVelocity { get; set; }

The angular velocity of the body.

    public Vector3 CenterOfMass { get; }

    public Vector3 InverseInertia { get; }

The inverse of the inertia of the body.

    public float InverseMass { get; }

The inverse of the mass of the body.

    public Vector3 LinearVelocity { get; set; }

The linear velocity of the body.

    public Basis PrincipalInertiaAxes { get; }

    public bool Sleeping { get; set; }

true if this body is currently sleeping (not active).

    public float Step { get; }

The timestep (delta) used for the simulation.

    public float TotalAngularDamp { get; }

The rate at which the body stops rotating, if there are not any other forces moving it.

    public Vector3 TotalGravity { get; }

The total gravity vector being currently applied to this body.

    public float TotalLinearDamp { get; }

The rate at which the body stops moving, if there are not any other forces moving it.

    public Transform Transform { get; set; }

The transformation matrix of the body.

Methods

    public void AddForce(Vector3 force, Vector3 position)

    public void ApplyImpulse(Vector3 position, Vector3 j)

    public void ApplyTorqeImpulse(Vector3 j)

This method is deprecated. Please use ApplyTorqueImpulse(Godot.Vector3) instead.

    public void ApplyTorqueImpulse(Vector3 j)

    public Vector3 GetAngularVelocity()

Getter for AngularVelocity

    public Vector3 GetCenterOfMass()

Getter for CenterOfMass

    public RID GetContactCollider(int contactIdx)

    public int GetContactColliderId(int contactIdx)

    public Object GetContactColliderObject(int contactIdx)

    public Vector3 GetContactColliderPosition(int contactIdx)

    public int GetContactColliderShape(int contactIdx)

    public Vector3 GetContactColliderVelocityAtPosition(int contactIdx)

    public int GetContactCount()

    public Vector3 GetContactLocalNormal(int contactIdx)

    public Vector3 GetContactLocalPosition(int contactIdx)

    public int GetContactLocalShape(int contactIdx)

    public Vector3 GetInverseInertia()

Getter for InverseInertia

    public float GetInverseMass()

Getter for InverseMass

    public Vector3 GetLinearVelocity()

Getter for LinearVelocity

    public Basis GetPrincipalInertiaAxes()

Getter for PrincipalInertiaAxes

    public PhysicsDirectSpaceState GetSpaceState()

    public float GetStep()

Getter for Step

    public float GetTotalAngularDamp()

Getter for TotalAngularDamp

    public Vector3 GetTotalGravity()

Getter for TotalGravity

    public float GetTotalLinearDamp()

Getter for TotalLinearDamp

    public Transform GetTransform()

Getter for Transform

    public void IntegrateForces()

    public bool IsSleeping()

Getter for Sleeping

    public void SetAngularVelocity(Vector3 velocity)

Setter for AngularVelocity

    public void SetLinearVelocity(Vector3 velocity)

Setter for LinearVelocity

    public void SetSleepState(bool enabled)

Setter for Sleeping

    public void SetTransform(Transform transform)

Setter for Transform

Tags: