In Corona, we use physics.addBody to create physics properties from Sprite then listen for collision event.
Now with Gideros, I've tried to add box2D body to Sprite, all fine but unfortunately by doing this, the sprite movement doesn't work - it just drop (i read some tutorials but most of them use gravity on physic body) When I set gravity = 0, movement function is useless.
I found Simple Collision Detection for Sprite here
http://www.giderosmobile.com/forum/discussion/121/simple-collision-detection but cannot apply because i don't know how to manually loop through a sprite group/collection and check for collision with item in other sprite group/collection
Sorry for my bad english, hope you guys can understand. This seem to be a basic knowledge but I would waste a lot of time discovering it without your help.
Thank so much
Comments
For looping over a group of sprite, basicaly you need to save sprites in a table then loop over that table and call the collision function. Here is an illustrative code:
Btw, is it affect performance if we loop like this? Compare with using physics?
Ultimate Games on Appstore
Ultimate Games on Google Play
Here is a great alternative for collision detection without physics and an optimized one
http://www.tntparticlesengine.com/?cat=15