I'm trying to create a elliptical object in box2D (Cocos2D). So far I've used b2CircleShape for that but I've realized that it ain't gonna cut it no more, I have to have elliptically shaped body. Is it posible? I've tried with b2PolygonShape but than my edges are linear and I need them to be curved.
Anybody had a same problem? Any suggestions?
You can try with a polygon shape and create the "ellipse" from segments: the ellipse will be a convex polygon for sure, and you can add a reasonable number of segments. This will be just an approximation, but you can fine tune later the number of segments to give you the best ration between performance and approximation to the original shape.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With