| Package | Box2D.Dynamics |
| Class | public class b2BodyDef |
| Source | b2BodyDef.as |
| Property | Defined by | ||
|---|---|---|---|
| active : Boolean
Does this body start out active?
| b2BodyDef | ||
| allowSleep : Boolean
Set this flag to false if this body should never fall asleep.
| b2BodyDef | ||
| angle : Number
The world angle of the body in radians.
| b2BodyDef | ||
| angularDamping : Number
Angular damping is use to reduce the angular velocity.
| b2BodyDef | ||
| angularVelocity : Number
The angular velocity of the body.
| b2BodyDef | ||
| awake : Boolean
Is this body initially awake or sleeping?
| b2BodyDef | ||
| bullet : Boolean
Is this a fast moving body that should be prevented from tunneling through
other moving bodies? Note that all bodies are prevented from tunneling through
static bodies.
| b2BodyDef | ||
| fixedRotation : Boolean
Should this body be prevented from rotating? Useful for characters.
| b2BodyDef | ||
| inertiaScale : Number
Scales the inertia tensor.
| b2BodyDef | ||
| linearDamping : Number
Linear damping is use to reduce the linear velocity.
| b2BodyDef | ||
| linearVelocity : b2Vec2
The linear velocity of the body's origin in world co-ordinates.
| b2BodyDef | ||
| position : b2Vec2
The world position of the body.
| b2BodyDef | ||
| type : uint The body type: static, kinematic, or dynamic.
| b2BodyDef | ||
| userData : *
Use this to store application specific body data.
| b2BodyDef | ||
| Method | Defined by | ||
|---|---|---|---|
|
This constructor sets the body definition default values.
| b2BodyDef | ||
| active | property |
public var active:BooleanDoes this body start out active?
| allowSleep | property |
public var allowSleep:BooleanSet this flag to false if this body should never fall asleep. Note that this increases CPU usage.
| angle | property |
public var angle:NumberThe world angle of the body in radians.
| angularDamping | property |
public var angularDamping:NumberAngular damping is use to reduce the angular velocity. The damping parameter can be larger than 1.0f but the damping effect becomes sensitive to the time step when the damping parameter is large.
| angularVelocity | property |
public var angularVelocity:NumberThe angular velocity of the body.
| awake | property |
public var awake:BooleanIs this body initially awake or sleeping?
| bullet | property |
public var bullet:BooleanIs this a fast moving body that should be prevented from tunneling through other moving bodies? Note that all bodies are prevented from tunneling through static bodies.
Warning: You should use this flag sparingly since it increases processing time.
| fixedRotation | property |
public var fixedRotation:BooleanShould this body be prevented from rotating? Useful for characters.
| inertiaScale | property |
public var inertiaScale:NumberScales the inertia tensor.
Warning: Experimental
| linearDamping | property |
public var linearDamping:NumberLinear damping is use to reduce the linear velocity. The damping parameter can be larger than 1.0f but the damping effect becomes sensitive to the time step when the damping parameter is large.
| linearVelocity | property |
public var linearVelocity:b2Vec2The linear velocity of the body's origin in world co-ordinates.
| position | property |
public var position:b2Vec2The world position of the body. Avoid creating bodies at the origin since this can lead to many overlapping shapes.
| type | property |
public var type:uintThe body type: static, kinematic, or dynamic. A member of the b2BodyType class Note: if a dynamic body would have zero mass, the mass is set to one.
See also
| userData | property |
public var userData:*Use this to store application specific body data.
| b2BodyDef | () | constructor |
public function b2BodyDef()This constructor sets the body definition default values.