Hey
I have created a ball
[lua]–> ball stuff
local ballBody = { density=0.8, friction=0.3, bounce=0.8, radius=9 }
local ball = display.newImage(“gfx/ball.png”,180,50)
ball.linearDamping = 0.3
ball.angularDamping = 0.8
physics.addBody(ball, ballBody)[/lua]
I also have created a ground floor
[lua]local ground = display.newImage(“gfx/table.png”, true)
ground.y = display.contentHeight - ground.contentHeight/2
physics.addBody( ground, “static”, { friction = 1.0, bounce = 0.8, density = 1.0 } )[/lua]
I initiate the physics engine like this
[lua]–> Physics
local physics = require(“physics”)
physics.start()
physics.setGravity( 0, 9.81) – 9.81 m/s*s in the positive x direction
physics.setScale(200) – 200 pixels per meter[/lua]
The ball bounces perfect with respect to bounce and gravity BUT it never ends, it keep on bouncing forever.
Please help me stop him! [import]uid: 22737 topic_id: 6189 reply_id: 306189[/import]
