physics - Create a ring body in PhysicsJS -
i working on project requires circular ring shaped body. how can achieve this? have tried use convex-polygon body vertices similar of circle getting the vertices specified not match of _convex_ polygon. error. how else can make ring shape? here current attempt: var ring = physics.body('convex-polygon',{ x: renderer.width* 0.35, y: renderer.height *0.75, vertices : [ { x: -5, y: 0}, { x: -3, y: 4}, { x: -4, y: 3}, { x: 0, y: 5}, { x: 3, y: 4}, { x: 4, y: 3}, { x: 5, y: 0}, { x: 3, y: -4}, { x: 4, y: -3}, { x: 0, y: -5}, { x: -3, y: -4}, { x: -4, y: -3} ] }); thanks in advance! a ring shaped body not convex, reason model (assuming vertices correct) not work. this old answer seems suggest concave objects such yours not implemented in physicsjs. might have changed, if not want not possible. edit: link seems have been broken. fixed.