Fields

@:optionaloptionaly:Null<Float>

The Body's position on the Y axis.

@:optionaloptionalx:Null<Float>

The Body's position on the X axis.

@:optionaloptionalvelocity_y:Null<Float>

The units/second that a Body moves on the Y axis.

@:optionaloptionalvelocity_x:Null<Float>

The units/second that a Body moves on the X axis.

@:optionaloptionalshapes:Null<Array<ShapeOptions>>

Defines an array of Shapes that the Body will use as colliders

@:optionaloptionalshape_instances:Null<Array<Shape>>

An array of Shape instances that the Body will use as colliders

@:optionaloptionalshape_instance:Null<Shape>

A Shape instance that the Body will use as a collider

@:optionaloptionalshape:Null<ShapeOptions>

Defines a Shape that the Body will use as a collider

@:optionaloptionalscale_y:Null<Float>

The Body's scale on the Y axis.

@:optionaloptionalscale_x:Null<Float>

The Body's scale on the X axis.

@:optionaloptionalrotational_velocity:Null<Float>

The units/second that a Body will rotate. Currently is not Implemented.

@:optionaloptionalrotational_drag:Null<Float>

A measure of how fast a Body will move its rotational_velocity towards 0.

@:optionaloptionalrotation:Null<Float>

The Body's rotation.

@:optionaloptionalmax_velocity_y:Null<Float>

The maximum velocity range that a Body can have on the Y axis. If set to 0, the Body has no restrictions on how fast it can move.

Note: this is calculated separately from a Body's max_velocity_length, so be careful when applying both.

@:optionaloptionalmax_velocity_x:Null<Float>

The maximum velocity range that a Body can have on the X axis. If set to 0, the Body has no restrictions on how fast it can move.

Note: this is calculated separately from a Body's max_velocity_length, so be careful when applying both.

@:optionaloptionalmax_velocity_length:Null<Float>

The maximum velocity that a Body can have along the velocity's length. If set to 0, the Body has no restrictions on how fast it can move.

Note: this is calculated separately from a Body's max_velocity_x or 'max_velocity_y', so be careful when applying both.

@:optionaloptionalmax_rotational_velocity:Null<Float>

The maximum rotational velocity range that a Body can have.

If set to 0, the Body has no restrictions on how fast it can rotate.

@:optionaloptionalmaterial:Null<Material>

@:optionaloptionalmass:Null<MassType>

The Body's mass. Affects how the Body reacts to Collisions and Acceleration Forces. The higher a Body's mass, the more resistant it is to those forces.

Can be set to a Float value, AUTO, or STATIC (mass = 5, mass = AUTO, and mass = STATIC are all valid).

If set to AUTO, the Body will automatically calculate it's mass based on it's volume and material's density. If a Body's mass is set to STATIC or 0, it becomes static - unmovable by forces and collisions.

If this value is left null, it will automatically be set to the same value as Body.default_mass.

@:optionaloptionalkinematic:Null<Bool>

Flag to set how a Body is affected by Collisions.

If set to true, the Body will still Collide and move through the world, but it will not be moved by external collision forces. This is useful for things like moving platforms.

@:optionaloptionalgravity_scale:Null<Float>

Deprecated: "Gravity Value has been moved into the Material object. Set `material.gravity_scale instead."

Percentage value that represents how much a World's gravity affects the Body.

@:optionaloptionalelasticity:Null<Float>

Deprecated: "Elasticity Value has been moved into the Material object. Set `material.elasticity instead."

Value to determine how much of a Body's velocity should be retained during collisions (or how much should the Body "bounce" in other words).

@:optionaloptionaldrag_y:Null<Float>

A measure of how fast a Body will move its velocity towards 0 on the Y axis when there is no acceleration.

Note: this is calculated separately from a Body's drag_length, so be careful when applying both.

@:optionaloptionaldrag_x:Null<Float>

A measure of how fast a Body will move its velocity towards 0 on the X axis when there is no acceleration.

Note: this is calculated separately from a Body's drag_length, so be careful when applying both.

@:optionaloptionaldrag_length:Null<Float>

A measure of how fast a Body will move its velocity towards 0 along the velocity's length, when there is no acceleration.

Note: this is calculated separately from a Body's drag, so be careful when applying both.