PhysicsBody

represents a physics body

Constructors

this
this(float mass, BodyType type)
Undocumented in source.

Members

Enums

BodyType
enum BodyType
Undocumented in source.

Functions

apply_force
void apply_force(Vector3 value, Vector3 pos)

apply a force to the physics body

apply_impulse
void apply_impulse(Vector3 value, Vector3 pos)

apply an impulse to the physics body

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

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

sync_properties
void sync_properties()

notify physics engine about new physical properties, such as gravity

sync_transform
void sync_transform()

used to notify the physics engine when transform is directly modified

Variables

angular_velocity
Vector3 angular_velocity;
Undocumented in source.
custom_gravity
bool custom_gravity;
Undocumented in source.
gravity
Vector3 gravity;
Undocumented in source.
mass
float mass;
Undocumented in source.
max_speed
float max_speed;
Undocumented in source.
physics_synced
bool physics_synced;

whether this body is currently in sync with the physics system

velocity
Vector3 velocity;
Undocumented in source.

Inherited Members

From Component

__anonymous
mixin Reflect
Undocumented in source.
entity
Entity entity;

owner entity

setup
void setup()

initialize the component. entity is already set.

destroy
void destroy()

release resources and clean up

transform
Transform transform [@property getter]

forward to entity.transform

Meta