DynamicBody

a dynamic physics body that is affected by forces

version(physics)
class DynamicBody : PhysicsBody {}

Constructors

this
this(float mass)
Undocumented in source.

Inherited Members

From PhysicsBody

mass
float mass;

object mass

max_speed
float max_speed;

moment of inertia max speed of object

velocity
Vector3 velocity;

current linear velocity of object

angular_velocity
Vector3 angular_velocity;

current angular velocity of object

damping
float damping;

damping amount

bounce
float bounce;

bounce amount

friction
float friction;

coefficient of friction

custom_gravity
bool custom_gravity;

whether to use a custom gravity value

gravity
Vector3 gravity;

if custom gravity is enabled, the gravity to use

physics_synced
bool physics_synced;

whether this body is currently in sync with the physics system

BodyType
enum BodyType

physics body mode: dynamic or static

setup
void setup()
Undocumented in source. Be warned that the author may not have intended to support it.
apply_impulse
void apply_impulse(Vector3 value, Vector3 pos)

apply an impulse to the physics body

apply_force
void apply_force(Vector3 value, Vector3 pos)

apply a force to the physics body

apply_torque
void apply_torque(Vector3 value)

apply a torque to the physics body

sync_properties
void sync_properties()

notify physics engine about new physical properties, such as gravity

sync_colliders
void sync_colliders()

used to notify the physics engine to update colliders if they have changed

sync_transform
void sync_transform()

used to notify the physics engine when transform is directly modified

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

Meta