There is nothing in place to help with that. With the physics behavior the shapes need to be defined in the editor before the game is run. You could use the canvas or paster plugins to draw the object though.
One idea could be to build the shapes out of a bunch of simpler objects and join them together with joints, but that does have some issues. Namely objects joined together with joints behave a bit spongy.
A better solution is to work with the physics engine at a lower level using javascript, although you can't really do this along with the physics behavior. More on this in a moment.
The basic flow of your game would be to:
1. when you draw the shape a list of points is made.
2. Those points make up a polygon. This needs to be converted to a list of triangles or at least convex polygons. This is mainly for the physics engines which generally don't work with concave polygons.
3. find the center of mass by averaging the point locations.
4. create the physics object with that shape.
That may vary depending on what a given physics engine does for you.
Here's one possible example of using javascript to access a physics engine instead of using the behavior:
https://dl.dropboxusercontent.com/u/542 ... ysics.capx
On another note you did say simple objects. You probably could use some gesture recognition to see if the object is close to a circle, square or triangle. Then add a sprite with that shape and size and orient it to approximately match the area drawn. The gesture recognition is something a plugin may be able to help you with, or maybe even some other capx on the forum.
Thanks a lot.
Yes shapes are basic (Circle, Rectangle, Triangle or upto 5 faces max).
Since, shapes has to be defined, is it possible that through canvas or paster, player defines a shape. There will be start button, then once player presses it, those shapes will be given physics behavior. Then some simulation happens. Can this be done ??