We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The brown part is the static water,build by convex, in the end, the box was flying out of the brown part,but the circle is fine.
let water = this.water = new p2.Body({ type: p2.Body.STATIC, }); water.label = BodyLabels.water; waters.forEach(w => { w.forEach(a => { let convex = new p2.Convex({ vertices: Matter.Vertices.clockwiseSort(a).map(v => [v.x, v.y]), collisionGroup: Collisions.water, collisionMask: Collisions.blockMask, }); water.addShape(convex); }) }); world.addBody(water);
The box is very simple
let body = new p2.Body({ mass: 1, position: [350, 480], }); body.addShape(new p2.Box({ width: 72, height: 36, collisionGroup: Collisions.rock, collisionMask: Collisions.blockMask, })) world.addBody(body)
// MyWorld extends p2.World let world = new MyWorld({ gravity: [0, 0], }); world.solver.iterations = 50
But I do use pixel unit, dose this will cause the problem ? because kms is not very friendly.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The brown part is the static water,build by convex, in the end, the box was flying out of the brown part,but the circle is fine.
The box is very simple
But I do use pixel unit, dose this will cause the problem ? because kms is not very friendly.
The text was updated successfully, but these errors were encountered: