Package | Box2D.Dynamics |
Class | public class b2BodyDef |
Source | b2BodyDef.as |
Property | Defined by | ||
---|---|---|---|
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 | ||
fixedRotation : Boolean
Should this body be prevented from rotating? Useful for characters.
| b2BodyDef | ||
isBullet : 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 | ||
isSleeping : Boolean
Is this body initially sleeping?
| b2BodyDef | ||
linearDamping : Number
Linear damping is use to reduce the linear velocity.
| b2BodyDef | ||
massData : b2MassData
You can use this to initialized the mass properties of the body.
| b2BodyDef | ||
position : b2Vec2
The world position of the body.
| b2BodyDef | ||
userData : *
Use this to store application specific body data.
| b2BodyDef |
Method | Defined by | ||
---|---|---|---|
This constructor sets the body definition default values.
| b2BodyDef |
allowSleep | property |
public var allowSleep:Boolean
Set this flag to false if this body should never fall asleep. Note that this increases CPU usage.
angle | property |
public var angle:Number
The world angle of the body in radians.
angularDamping | property |
public var angularDamping:Number
Angular 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.
fixedRotation | property |
public var fixedRotation:Boolean
Should this body be prevented from rotating? Useful for characters.
isBullet | property |
public var isBullet: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.
Warning: You should use this flag sparingly since it increases processing time.
isSleeping | property |
public var isSleeping:Boolean
Is this body initially sleeping?
linearDamping | property |
public var linearDamping:Number
Linear 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.
massData | property |
public var massData:b2MassData
You can use this to initialized the mass properties of the body. If you prefer, you can set the mass properties after the shapes have been added using b2Body::SetMassFromShapes.
See also
position | property |
public var position:b2Vec2
The world position of the body. Avoid creating bodies at the origin since this can lead to many overlapping shapes.
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.