A composite body is made up of multiple bodies each with points defined as an x,y location. This not appear to allow a radius to be included because there is no way of defining an X,Y,radius point.
Am I wrong?
A composite body is made up of multiple bodies each with points defined as an x,y location. This not appear to allow a radius to be included because there is no way of defining an X,Y,radius point.
Am I wrong?
Hi Matt,
You’re correct, the composite body must be made of all polygon shapes. If you need a circle, probably the best option is to draw an octagon, or for slightly better accuracy (if needed), draw two halves of the circle with 8 sides each and put them side-by-side. Yeah, it’s a bit of extra work, but such is the fact. Even if you did have the ability to add a circle (actual circle) to a complex body, it wouldn’t be exceptionally useful since it could only be placed around the center origin, i.e. you couldn’t put 4 circular bodies at different “corners” of the body, and you’d have to draw them with polygons regardless.
Brent
Brent, thanks, glad I’m not going crazy.
I seem to remember using PhysicsEditor some time ago and accidentally adding a circle - you’re right, it actually couldn’t be placed anywhere but the center. I don’t know if it would render as such in Corona as I didn’t try it, but PhysicsEditor would let circles be placed.
I guess I’ll have to weld some circles to a rectangle.
Hi Matt,
You’re correct, the composite body must be made of all polygon shapes. If you need a circle, probably the best option is to draw an octagon, or for slightly better accuracy (if needed), draw two halves of the circle with 8 sides each and put them side-by-side. Yeah, it’s a bit of extra work, but such is the fact. Even if you did have the ability to add a circle (actual circle) to a complex body, it wouldn’t be exceptionally useful since it could only be placed around the center origin, i.e. you couldn’t put 4 circular bodies at different “corners” of the body, and you’d have to draw them with polygons regardless.
Brent
Brent, thanks, glad I’m not going crazy.
I seem to remember using PhysicsEditor some time ago and accidentally adding a circle - you’re right, it actually couldn’t be placed anywhere but the center. I don’t know if it would render as such in Corona as I didn’t try it, but PhysicsEditor would let circles be placed.
I guess I’ll have to weld some circles to a rectangle.