Struct b3BodyDef
- Namespace
- Box3D.Native
- Assembly
- Box3D.NET.Native.dll
The definition used to create a rigid body. Mirror of b3BodyDef.
public struct b3BodyDefInherited Members
Examples
b3BodyDef def = B3.b3DefaultBodyDef();
def.type = b3BodyType.b3_dynamicBody;
def.position = new Vector3(0.0f, 10.0f, 0.0f);
b3BodyId body = B3.b3CreateBody(world, in def);
Remarks
Always start from B3.b3DefaultBodyDef(); Box3D rejects definitions
whose Box3D.Native.b3BodyDef.internalValue was never initialized. Definitions are
temporary parameter bundles and can be reused freely. Shapes are attached
after the body is created.
Fields
- allowFastRotation
-
Allows the body to bypass rotational speed limits.
- angularDamping
-
Angular damping, used to slow down rotating bodies.
- angularVelocity
-
The initial angular velocity, in radians per second.
- enableContactRecycling
-
Whether contact recycling is enabled. On by default.
- enableSleep
-
Whether this body may fall asleep.
- gravityScale
-
Scales the gravity applied to this body. Non-dimensional.
- internalValue
-
Used internally to detect a valid definition. Do not set.
- isAwake
-
Whether the body starts awake.
- isBullet
-
Treats the body as a high-speed object that performs continuous collision against dynamic and kinematic bodies, but not against other bullets.
- isEnabled
-
Whether the body participates in the simulation at all.
- linearDamping
-
Linear damping, used to reduce linear velocity.
- linearVelocity
-
The initial linear velocity of the body origin, usually in metres per second.
- motionLocks
-
Locks restricting linear and angular movement.
- name
-
An optional name for debugging, as a null-terminated UTF-8 string.
- position
-
The initial world position of the body origin.
- rotation
-
The initial world rotation.
- sleepThreshold
-
The sleep speed threshold, usually in metres per second.
- type
-
The body type: static, kinematic or dynamic.
- userData
-
Application data associated with the body.