I am planning on creating a puzzle/platform game soon, just a simple one, using box2d 2.1a. I was wondering if there were a way to create curved shapes easily without using say a circle shape. For example take the sonic games where they have the loops, or a curvy sloping hill, I'd like to be able to somewhat replicate that if I can. Any ideas on how to accomplish this without making a ton of small edges?
Curved Shapes
FlashHave a look at SVN, there's a new demo for this.
I went through the SVN on Sourceforge, and I was unable to find anything about this, the closest I got was b2PolygonRadius, which I can't figure out how to even use. Lol I went through just about everything trying to find what I was looking for. Do you have a link or can you tell me where exactly I might find this? I did get the new version and update it so, maybe tell me the classes to use or something. Thank you, I appreciate it. 🙂
*EDIT*
OK I found the b2SVG, and b2Bezier as being the new addition for creating curved shapes, Although, I can't seem to get them to work correctly in the test bed to play around with it. in the Main.as file I added to the array of tests b2SVG, however when I run it, I get compiler errors about friction and edgeshapes, etc being undefined. I know my source paths are correct, as the testbed itself is linking to the one in the zip file I dl'd and flash itself is has a global class path created to include the exact same files in a different directory for use with all my projects. I know the path is correct as well because it worked for a different game I made. Any suggestions?
*EDIT*
OK I found the b2SVG, and b2Bezier as being the new addition for creating curved shapes, Although, I can't seem to get them to work correctly in the test bed to play around with it. in the Main.as file I added to the array of tests b2SVG, however when I run it, I get compiler errors about friction and edgeshapes, etc being undefined. I know my source paths are correct, as the testbed itself is linking to the one in the zip file I dl'd and flash itself is has a global class path created to include the exact same files in a different directory for use with all my projects. I know the path is correct as well because it worked for a different game I made. Any suggestions?
The testbed includes an SVG test. Can you get the testbed to compile?
Original thread: https://box2d.org/forum/viewtopic.php?t=4935