PhysicsDirectBodyState

@GodotBaseClass
struct PhysicsDirectBodyState {}

Members

Aliases

BaseClasses
alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses)
Undocumented in source.

Functions

addCentralForce
void addCentralForce(Vector3 force)

Adds a constant directional force without affecting rotation. This is equivalent to add_force(force, Vector3(0,0,0)).

addForce
void addForce(Vector3 force, Vector3 position)

Adds a constant force (i.e. acceleration).

addTorque
void addTorque(Vector3 torque)

Adds a constant rotational force (i.e. a motor) without affecting position.

applyCentralImpulse
void applyCentralImpulse(Vector3 j)

Applies a single directional impulse without affecting rotation. This is equivalent to `apply_impulse(Vector3(0,0,0), impulse)`.

applyImpulse
void applyImpulse(Vector3 position, Vector3 j)

Apply a positioned impulse (which will be affected by the body mass and shape). This is the equivalent of hitting a billiard ball with a cue: a force that is applied once, and only once. Both the impulse and the position are in global coordinates, and the position is relative to the object's origin.

applyTorqueImpulse
void applyTorqueImpulse(Vector3 j)

Apply a torque impulse (which will be affected by the body mass and shape). This will rotate the body around the passed in vector.

getAngularVelocity
Vector3 getAngularVelocity()
getCenterOfMass
Vector3 getCenterOfMass()
getContactCollider
RID getContactCollider(long contact_idx)
getContactColliderId
long getContactColliderId(long contact_idx)
getContactColliderObject
GodotObject getContactColliderObject(long contact_idx)
getContactColliderPosition
Vector3 getContactColliderPosition(long contact_idx)
getContactColliderShape
long getContactColliderShape(long contact_idx)
getContactColliderVelocityAtPosition
Vector3 getContactColliderVelocityAtPosition(long contact_idx)
getContactCount
long getContactCount()
getContactImpulse
double getContactImpulse(long contact_idx)

Impulse created by the contact. Only implemented for Bullet physics.

getContactLocalNormal
Vector3 getContactLocalNormal(long contact_idx)
getContactLocalPosition
Vector3 getContactLocalPosition(long contact_idx)
getContactLocalShape
long getContactLocalShape(long contact_idx)
getInverseInertia
Vector3 getInverseInertia()
getInverseMass
double getInverseMass()
getLinearVelocity
Vector3 getLinearVelocity()
getPrincipalInertiaAxes
Basis getPrincipalInertiaAxes()
getSpaceState
PhysicsDirectSpaceState getSpaceState()
getStep
double getStep()
getTotalAngularDamp
double getTotalAngularDamp()
getTotalGravity
Vector3 getTotalGravity()
getTotalLinearDamp
double getTotalLinearDamp()
getTransform
Transform getTransform()
integrateForces
void integrateForces()
isSleeping
bool isSleeping()
opAssign
PhysicsDirectBodyState opAssign(T n)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(PhysicsDirectBodyState other)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(typeof(null) n)
Undocumented in source. Be warned that the author may not have intended to support it.
setAngularVelocity
void setAngularVelocity(Vector3 velocity)
setLinearVelocity
void setLinearVelocity(Vector3 velocity)
setSleepState
void setSleepState(bool enabled)
setTransform
void setTransform(Transform transform)

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Properties

angularVelocity
Vector3 angularVelocity [@property getter]
Vector3 angularVelocity [@property setter]

The angular velocity of the body.

centerOfMass
Vector3 centerOfMass [@property getter]
inverseInertia
Vector3 inverseInertia [@property getter]

The inverse of the inertia of the body.

inverseMass
double inverseMass [@property getter]

The inverse of the mass of the body.

linearVelocity
Vector3 linearVelocity [@property getter]
Vector3 linearVelocity [@property setter]

The linear velocity of the body.

principalInertiaAxes
Basis principalInertiaAxes [@property getter]
sleeping
bool sleeping [@property getter]
bool sleeping [@property setter]

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

step
double step [@property getter]

The timestep (delta) used for the simulation.

totalAngularDamp
double totalAngularDamp [@property getter]

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

totalGravity
Vector3 totalGravity [@property getter]

The total gravity vector being currently applied to this body.

totalLinearDamp
double totalLinearDamp [@property getter]

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

transform
Transform transform [@property getter]
Transform transform [@property setter]

The transformation matrix of the body.

Static functions

_new
PhysicsDirectBodyState _new()
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

_classBinding
struct _classBinding
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

_GODOT_internal_name
enum string _GODOT_internal_name;
Undocumented in source.

Mixed In Members

From mixin baseCasts

as
To as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
To as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
ToRef as()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(ToRef)
Undocumented in source.
opCast
void* opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
godot_object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta