Does anyone know if i can make compound collision shapes? Like a ball and a rectangle combined to make a mace or something?
I heard you can have multiple shapes inside a single body. When i did this, they are separate objects. The handle moves independently of the spike ball.(also, the rectangle is always at the same center point as the circle, i would like to position it relative to the circle)

I have toyed with joints, and the rect always stays locked in a rotation, even when i setFixedRotation(false).

Edit:

I want this:

Not this:

I don't know how bodies, shapes, or fixtures relate to each other very well, so if anyone knows any good resources to learn (other than the wiki, I've tried that.)

Last edited by Withered-Flame on Tue Jul 31, 2018 1:52 pm, edited 5 times in total.

I have one last question about excluding shapes from other shapes hit boxes, like a cookie cutter.

Is it possible to do that and draw it as well?

you're seriously asking for it now, it's likely not gonna be practical for you (vs simply drawing a concave polygon or maybe two if you want a "donut" (new word))... however scouting for this sort of thing i did find this library:

you would use the boolean "not" operation... i am still myself trying to combine this with my polygon reduction code. Note that you can cut out shapes sure... however, cutting a hole in the circle could not possibly give a valid polygon shape... an advanced 3D or vector program no doubt (i dunno if you recall quake 2 editors), it has to shove like a line leading to the hole (this code this guy wrote doesn't seem to do that bit)

dunno if i explained that well, will draw a picture if you didn't get me

I have one last question about excluding shapes from other shapes hit boxes, like a cookie cutter.

No, Box2D works with convex polygons up to 8 vertices max.
Box2D has several other limitations too like minimum edge length and vertex angle.
In short, you want to avoid long, thin triangles which is not simple.
Most geometry libraries will NOT work well with Box2d.
If the output is for rendering only then yes, you could probably get away with it.
Briefly going over AlexarJING's code - it doesn't look very impressive and I also have doubts about its robustness.
The most popular libs are Clipper (for polygon operations) and Poly2Tri (for triangulation) but you need to use those through FFI. And like I said, their output is not designed for Box2D.
The most sensible approach with Box2D is to use simple, overlapping shapes.
Good luck!