Help with simple ball-physics?

I’m trying to emulate the physical interaction of two balls, similar to the “Simple Pool” demo.

FPS is 60,
Scale is 60
Gravity is 0,0 (horizontal plane)

All the properties of the two balls are identical to the balls in the pool app,

–my app
local ballprops = {density=0.8, friction=0.2, bounce=0.5, radius=15}
local ballbody = {density=0.8, friction=0.2, bounce=0.5, radius=15}

ball.linearDamping = 0.3
ball.angularDamping = 0.8
ball.isBullet = true

–sample app

Force vector is nearly identical:
{ density=0.8, friction=0.2, bounce=0.5, radius=15 }

–my app:
xForce:-1,yForce:-139

–pool app:
xForce,-2,yForce:-130

When I call “applyForce” on the ball, it launches just fine, but it ends up pushing the ball, while it continues moving forward.

I have no idea what else I might be doing wrong. I could really use some ideas on what else I could check. [import]uid: 22457 topic_id: 5745 reply_id: 305745[/import]

applyLinearImpulse?

I’ve not looked at the simple pool code in ages.

M [import]uid: 8271 topic_id: 5745 reply_id: 19676[/import]

Thanks for the reply. I’ve tried both applyLinearImpulse, and applyForce, and both don’t do what I expect. It’s like the ball is on ice, and when the sorce ball collides with the 2nd ball, it doesn’t effect the source ball at all.

FWIW, the sample pool demo uses :applyForce

[import]uid: 22457 topic_id: 5745 reply_id: 19678[/import]

have you added friction? [import]uid: 6645 topic_id: 5745 reply_id: 19735[/import]

Yes. The ball properties have friction of 0.2

My actual code is fairly involved (read: kludgey), so to figure this out, I just created a simple 2-physics bodies environment to play with the parameters. [import]uid: 22457 topic_id: 5745 reply_id: 19739[/import]