Difference between shape and outline?

What’s the difference between a physics Shape and an Outline in Corona?

I know that an outline can be concave, but I’m wondering what the technical differences are.

In which case is it better to use a shape instead of an outline and vice versa?

Hi @ingemar,

I didn’t engineer the graphics.newOutline() functionality, but as far as I know, it internally builds a multi-shape body using several regular shapes. So, it can be “concave” because it uses multiple shapes to achieve that, just like if you were to construct a concave body in a physics shape editor or similar.

So, I don’t think there’s necessarily a “better” way, except that outline is meant to be used with graphics.newOutline(). I’ve seen a few users trying to manually tweak the outline coordinates, but I don’t recommend doing so. It’s a convenience function for tracing an image, and if you really want to custom-adjust a multi-shape body, I recommend you do so in Physics Editor or similar.

Best regards,

Brent

Hi @ingemar,

I didn’t engineer the graphics.newOutline() functionality, but as far as I know, it internally builds a multi-shape body using several regular shapes. So, it can be “concave” because it uses multiple shapes to achieve that, just like if you were to construct a concave body in a physics shape editor or similar.

So, I don’t think there’s necessarily a “better” way, except that outline is meant to be used with graphics.newOutline(). I’ve seen a few users trying to manually tweak the outline coordinates, but I don’t recommend doing so. It’s a convenience function for tracing an image, and if you really want to custom-adjust a multi-shape body, I recommend you do so in Physics Editor or similar.

Best regards,

Brent