Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Does the physics.addBody() only work with Circles and Rectangles? Or is it possible to physics.addBody() on vector shapes or sprites or with masks or something?

share|improve this question
add comment

2 Answers

It works with more than just circles and rectangles. To be more specific,

[physics.addBody()] Allows you to turn any Corona display object into a simulated physical object with one line of code, including the assignment of physical properties.

The full explanation, along with examples including a rectangle, circle, and polygon, can be found here.

share|improve this answer
add comment

If you want an irregular physics object, you have to specify the x and y coordinates of the physic body. Complicated, but possible.

Or you can use a third-party tool like PhysicsEditor.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.