- 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)
- 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.