How to attach objects in physics?

Since i am a newbie, i am experimenting with physics in corona using simple objects. One problem i ran into was using a function to attach and keep count of objects attach using physics. How can i attach objects while making sure that they dont get seperated? 

Also if i am using multicoloured objects, i would like attach one color to its similar color, and another color to its own similar object. How can i achieve that?

I would be grateful for some help in this case.

Hi @naffahamin,

To “attach” objects, you’ll need to use physics joints, but this topic is slightly more advanced. I recommend that you read all of the physics guides at the top of the following link… this should give you a foundation to accomplish what you need.

http://coronalabs.com/resources/tutorials/physics-box2d/

Best regards,

Brent

Hi @naffahamin,

To “attach” objects, you’ll need to use physics joints, but this topic is slightly more advanced. I recommend that you read all of the physics guides at the top of the following link… this should give you a foundation to accomplish what you need.

http://coronalabs.com/resources/tutorials/physics-box2d/

Best regards,

Brent