i can't get collisions between circle or line shapes and box/polygon, only box to box and box to polygon. How do i set the circle shape to make physical collision with other shapes? Is that what collisionGroups are for? if that's the case how come polygon to box collides happily with no collisionGroup/mask set?
/*
circle passes through other polygon / box shapes
*/
var circleShape = new p2.Circle({radius: pxmi(50)});
circleShape.sensor = false;
this.circleBody = new p2.Body({
mass: 1,
position: [
pxm(200),
pxm(200)
],
angularVelocity: 1
});
this.circleBody.addShape(circleShape);
this.world.addBody(this.circleBody);
/*
other boxes / polygons cannnot pass through this boxShape/boxBody
*/
let boxShape = new p2.Box({width: pxm(25), height: pxm(25)});
boxShape.sensor = false;
this.boxBody = new p2.Body({
mass: 1,
position: [
pxm(200),
pxm(200)
],
angularVelocity: 1
});
this.boxBody.addShape(boxShape);
this.world.addBody(this.boxBody);
hi there,
i can't get collisions between circle or line shapes and box/polygon, only box to box and box to polygon. How do i set the circle shape to make physical collision with other shapes? Is that what collisionGroups are for? if that's the case how come polygon to box collides happily with no collisionGroup/mask set?