Constructor for a Shape
Body-local angle of the shape.
Area of this shape.
The body this shape is attached to. A shape can only be attached to a single body.
Bounding circle radius of this shape
Collision group that this shape belongs to (bit mask). See this tutorial.
Collision mask of this shape. See .collisionGroup.
Whether to produce contact forces when in contact with other bodies. Note that contacts will be generated, but they will be disabled. That means that this shape will move through other body shapes, but it will still trigger contact events, etc.
The width of each element
An array of numbers, or height values, that are spread out along the x axis.
Shape object identifier
Material to use in collisions for this Shape. If this is set to null, the world will use default material properties instead.
Max value of the heights
Min value of the heights
Body-local position of the shape.
Set to true if you want this shape to be a sensor. A sensor does not generate contacts, but it still reports contact events. This is good if you want to know if a shape is overlapping another shape, without them generating contacts.
The type of the shape. One of:
Box shape type
Capsule shape type
Circle shape type
Convex shape type
Heightfield shape type
Line shape type
Particle shape type
Plane shape type
ID counter for shapes
Should return the moment of inertia around the Z axis of the body. See Wikipedia's list of moments of inertia.
Test if a point is inside this shape.
whether a point is inside this shape
Perform raycasting on this shape.
Update the .area property of the shape.
Updates the bounding circle radius of this shape.
Heightfield shape class. Height data is given as an array. These data points are spread out evenly with a distance "elementWidth".
Should use a scale property with X and Y direction instead of just elementWidth