I am currently working on a project that requires a circular ring shaped body. How can I achieve this? I have tried to use a the convex-polygon
body with vertices similar to those of a circle but I am getting a The vertices specified do not match that of a _convex_ polygon.
error. How else can I make a ring shape?
Here is my 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!