I know you can’t do this on collision, but I heard you could do it with a timer delay, but it still doesn’t seem to be working, here is my code
ocal function speedCollision(event) local phase = event.phase local target = event.target local other = event.other if phase == "began" then if other.collisionType == "eggplant" then eggplant:applyForce( 0.05, 0, eggplant.x, eggplant.y) speed.alpha = 0 timer.performWithDelay(10, physics.removeBody(speed)) end end end speed:addEventListener("collision", speedCollision)
Also, the applyForce value applies the same amount of force to the object no matter what the x y values are, anyone know why?