Hi all, my problem is that, I have an Image 1 colliding with another image 2. When the two collide, image 1 bounces back up, as it should, but after a few bounces, very slowly, image 1 bounces off to the right. Eventually, it bounces right off the image 2 it is colliding with and goes off the screen… I have my gravity set to 0 on the x axis and 10 on the y axis. Here is my code where I set up the two images (bodies), and where I have the collision. Please tell me of any errors. Thank you !
local blak=display.newImageRect("assets/@\_blak.png",35,37) blak.x=centerX-50 blak.y=centerY+100 local platm=display.newImageRect("assets/plat.png",140,31) platm.x=centerX-70 platm.y=centerY+250 blak.bodyType = "dynamic" physics.addBody( blak, { bounce=0, friction=.5} ) physics.addBody( platm, "static", { friction=.5, bounce=1 } )