I’m studying Corona SDK.
What I want to do simply is a ball on the billiard table.
Not exactly, but like that.
So, I’ve created new square and user applyLinearImpulse method to move it.
Yes, it moved but, does not stop. What should I do to make the square getting slower?
[lua]physics = require(“physics”)
physics.start()
physics.setGravity(0, 0)
square = display.newRect(display.contentCenterX, display.contentCenterY, 50, 50)
square:setFillColor(255, 0, 0)
physics.addBody(square)
square:applyLinearImpulse(1, -1, square.x, squaer.y)[/lua] [import]uid: 123635 topic_id: 22005 reply_id: 322005[/import]