How good is the collision detection with Corona SDK?

Hi, I was wondering how good it is. Since I’m a former GameSalad user I’m used to bad collision detection, they only had 2 shapes, and if lets say I have a dog that needs to collide with humans, I can not use rectangles and circles. So that kind of collision is very limiting. How good is the collision detection using Corona?
I know you can use magnitudes on probably both GameSalad and Corona but that’s just a bad workaround. Say I have a morning star-looking ball with thorns that needs to collide with something. Magnitudes wont help at all.

Thanks :slight_smile: [import]uid: 14018 topic_id: 5069 reply_id: 305069[/import]

as long as your shape is convex, and only uses 8 points then you can define a custom polygon shape for your physics object. in your case though you might need to create a circle and attach triangles with weld joints or something like that, as probably you might not be able to define the shape with 8 points.

here are some links to get you started:
http://developer.anscamobile.com/content/game-edition-physics-joints
http://developer.anscamobile.com/content/game-edition-physics-bodies#Polygon_bodies

for performance sake i’d probably just make it a circle though, but with a radius slightly larger than the sphere to include the spikes… that’s not pixel perfect collision, but it’d probably be sufficient unless you really need the “realism” [import]uid: 6645 topic_id: 5069 reply_id: 16690[/import]

can you use a stretched circle shape like an oval shape and use that for collision? [import]uid: 14018 topic_id: 5069 reply_id: 16720[/import]

No ovals, but you can use a multi body element. Look at those links above. But even with that it does need to be convex. You could use a circle then attach triangles via weld joints. Although if its moving and interacting with other physics objects you will lag and stick and so forth. [import]uid: 10243 topic_id: 5069 reply_id: 19509[/import]