b2CircleShape Class
This class creates shape for circular physical bodies.
Item Index
Methods
- this constructor
Methods
this
(
B2CircleShape
radius
Creates new instance of b2CircleShape with required radius.
Parameters:
-
radius
FloatBody radius.
Returns:
B2CircleShape: New instance of b2CircleShape class.
Example:
//create new circular shape with radius 10
this.radius = 10;
var shape = new b2CircleShape(this.radius);
//create new Body. Position is set to 50, 20.
var body = this.world.createBody(shape, #dynamic, 1, 1, 1, 50, 20);