config.component.physics.body.fixture.polygon Class
* THIS IS NOT A CLASS! ITS A CONFIGURATION OBJECT. *
Physics polygon fixture configuration.
Item Index
Properties
angle
Float
Rotation angle of the fixture
categoryBits
Null | Integer
Category bits
density
Float
Density
The fixture density is used to compute the mass properties of the parent body. The density can be zero or positive. You should generally use similar densities for all your fixtures. This will improve stacking stability.
The mass of a body is not adjusted when you set the density. You must call ResetMassData for this to occur.
friction
Float
Slide behaviour
Friction is used to make objects slide along each other realistically. Box2D supports static and dynamic friction, but uses the same parameter for both. Friction is simulated accurately in Box2D and the friction strength is proportional to the normal force (this is called Coulomb friction). The friction parameter is usually set between 0 and 1, but can be any non-negative value. A friction value of 0 turns off friction and a value of 1 makes the friction strong. When the friction force is computed between two shapes, Box2D must combine the friction parameters of the two parent fixtures
isSensor
Boolean
Indicates that the fixture is a sensor
key
String
Identification key
Unique inside the enitity.
maskBits
Null | Integer
Mask bits
restitution
Float
Bounce behaviour
Restitution is used to make objects bounce.
The restitution value is usually set to be between 0 and 1. Consider dropping a ball on a table. A value of zero means the ball won't bounce. This is called an inelastic collision. A value of one means the ball's velocity will be exactly reflected. This is called a perfectly elastic collision.
type
String
Shape of the fixture
vertices
Array
List of vertices
x
Float
The horizontal position of the fixture related to the body center
y
Float
The vertical position of the fixture related to the body center