C# Class Box2DX.Dynamics.BodyDef

A body definition holds all the data needed to construct a rigid body. You can safely re-use body definitions.
Afficher le fichier Open project: KrugerHeavyIndustries/box2d-unity Class Usage Examples

Méthodes publiques

Свойство Type Description
AllowSleep bool
Angle float
AngularDamping float
AngularVelocity float
FixedRotation bool
IsBullet bool
IsSleeping bool
LinearDamping float
LinearVelocity System.Vector2
MassData Box2DX.Collision.MassData
Position System.Vector2
UserData object

Méthodes publiques

Méthode Description
BodyDef ( byte init ) : System

This constructor sets the body definition default values.

Method Details

BodyDef() public méthode

This constructor sets the body definition default values.
public BodyDef ( byte init ) : System
init byte
Résultat System

Property Details

AllowSleep public_oe property

Set this flag to false if this body should never fall asleep. Note that this increases CPU usage.
public bool AllowSleep
Résultat bool

Angle public_oe property

The world angle of the body in radians.
public float Angle
Résultat float

AngularDamping public_oe property

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.
public float AngularDamping
Résultat float

AngularVelocity public_oe property

public float AngularVelocity
Résultat float

FixedRotation public_oe property

Should this body be prevented from rotating? Useful for characters.
public bool FixedRotation
Résultat bool

IsBullet public_oe property

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.
public bool IsBullet
Résultat bool

IsSleeping public_oe property

Is this body initially sleeping?
public bool IsSleeping
Résultat bool

LinearDamping public_oe property

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.
public float LinearDamping
Résultat float

LinearVelocity public_oe property

public Vector2,System LinearVelocity
Résultat System.Vector2

MassData public_oe property

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 Body.SetMassFromShapes.
public MassData,Box2DX.Collision MassData
Résultat Box2DX.Collision.MassData

Position public_oe property

The world position of the body. Avoid creating bodies at the origin since this can lead to many overlapping shapes.
public Vector2,System Position
Résultat System.Vector2

UserData public_oe property

Use this to store application specific body data.
public object UserData
Résultat object