In another form post, someone mentioned basic collision detection without gravity or friction, etc:
http://developer.anscamobile.com/forum/2010/04/23/discussion-about-how-speed-your-game
So that is what I am interested in! I just need to know when two sprites collide, is there a preferred method for doing this?
I think I’m kind of doing it now, like so:
local physics = require( “physics” )
physics.start()
physics.setGravity( 0, 0 )
local hero = display.newImage( “hero.png” )
hero.x = 50; hero.y = 50;
physics.addBody( hero, { density=0, friction=0, bounce=0 } )
But the weird thing that is happening is that when I added the physics my hero image is being offset a little from it’s original placement (x=50, y=50) even though I have set the gravity to zero, plus I guess there is probably overhead in all of those other properties which I do not need.
So how do I do just basic collision detection, or in the very least fix the problem with the offsetting of the image?
Thanks!
[import]uid: 8139 topic_id: 3408 reply_id: 303408[/import]