Body Properties |
The Body type exposes the following members.
Name | Description | |
---|---|---|
AngularDamping |
Gets or sets the angular damping.
| |
AngularVelocity |
Gets or sets the angular velocity. Radians/second.
| |
Awake |
Set the sleep state of the body. A sleeping body has very
low CPU cost.
| |
BodyType |
Gets or sets the body type.
Warning: This property is readonly during callbacks.
| |
ContactList |
Get the list of all contacts attached to this body.
Warning: this list changes during the time step and you may
miss some collisions if you don't use callback events.
| |
Enabled |
Set the active state of the body. An inactive body is not
simulated and cannot be collided with or woken up.
If you pass a flag of true, all fixtures will be added to the
broad-phase.
If you pass a flag of false, all fixtures will be removed from
the broad-phase and all contacts will be destroyed.
Fixtures and joints are otherwise unaffected. You may continue
to create/destroy fixtures and joints on inactive bodies.
Fixtures on an inactive body are implicitly inactive and will
not participate in collisions, ray-casts, or queries.
Joints connected to an inactive body are implicitly inactive.
An inactive body is still owned by a b2World object and remains
in the body list.
Warning: This property is readonly during callbacks.
| |
FixedRotation |
Set this body to have fixed rotation. This causes the mass
to be reset.
| |
IgnoreCCD | ||
IgnoreGravity |
Gets or sets a value indicating whether this body ignores gravity.
| |
Inertia |
Get or set the rotational inertia of the body about the local origin. usually in kg-m^2.
Warning: This property is readonly during callbacks.
| |
IsBullet |
Gets or sets a value indicating whether this body should be included in the CCD solver.
| |
IslandIndex | ||
JointList |
Get the list of all joints attached to this body.
| |
LinearDamping |
Gets or sets the linear damping.
| |
LinearVelocity |
Get or sets the linear velocity of the center of mass.
| |
LocalCenter |
Get the local position of the center of mass.
Warning: This property is readonly during callbacks.
| |
Mass |
Gets or sets the mass. Usually in kilograms (kg).
Warning: This property is readonly during callbacks.
| |
Position |
Get the world body origin position.
| |
Revolutions |
Gets the total number revolutions the body has made.
| |
Rotation |
Get the angle in radians.
| |
SleepingAllowed |
You can disable sleeping on this body. If you disable sleeping, the
body will be woken.
| |
World |
Get the parent World of this body. This is null if the body is not attached.
| |
WorldCenter |
Get the world position of the center of mass.
|