1. ## Questions about Box 2D

Hey guys!

I'm trying to do some things with the Box 2D extension for flash, I'm new with this extension and I want to ask a few questions about this.

1) I know how to do very basic shapes, but how I can make triangular shapes?, like a ramp.

2) How I can do simple collision? for example, object A collides with the object B then the object A is destroyed.

3) And finally, how I can make a cannon that shoots bullets with physics?

¡Thanks!

2. Originally Posted by Sergiocarp
Hey guys!

I'm trying to do some things with the Box 2D extension for flash, I'm new with this extension and I want to ask a few questions about this.

1) I know how to do very basic shapes, but how I can make triangular shapes?, like a ramp.

2) How I can do simple collision? for example, object A collides with the object B then the object A is destroyed.

3) And finally, how I can make a cannon that shoots bullets with physics?

¡Thanks!
1) There is a program out there that can make shapes with ease, there is even an exporter with the MMF name but I have not got this to work, and the response seem to be 0 here for some reason :/ http://community.clickteam.com/showthread.php?t=72179
A triangular shape is not so complex however and easy to do, just look in the testbed example and there is examples of triangles.

2) and 3) Both of these are displayed in the testbed, there is even a fully functional "cannon"

3. Thanks Outcast!, That program looks amazing, I hope someone can make it work with MMF.

4. Outcast, in relation to your error message it looks like you have letters in the string that shouldn't be there. CSV stands for Comma Separated Values and means that it wants your polygon vertices in a string of the format X1,Y1,X2,Y2,X3,Y3 and so on. To do a 32x32 right triangle like L\ you would use 0,0,32,32,0,32 as your CSV string. Check that the program isn't outputting letters that are breaking it for you.

5. Originally Posted by Jacob
Outcast, in relation to your error message it looks like you have letters in the string that shouldn't be there. CSV stands for Comma Separated Values and means that it wants your polygon vertices in a string of the format X1,Y1,X2,Y2,X3,Y3 and so on. To do a 32x32 right triangle like L\ you would use 0,0,32,32,0,32 as your CSV string. Check that the program isn't outputting letters that are breaking it for you.
I will look into this. I am wondering if someone on this forum made this MMF extension for the program or if the program makers themself did it? (I did send a message to them about wanting an output for mmf but I never got a response so maybe it is someone here who made it?)