Page 1 of 1

Pong: Balls stick to Walls (Box2D solution exists)

Posted: Mon Dec 14, 2015 12:42 am
by Mongoose1021
Hey, folks,

I'm making a derpy pong game with the love.physics module for practice, but I'm having an issue where balls stick to walls if they hit them at sufficiently low velocity. I've had this problem with Box2D before, and there, the solution was to set velocityThreshold to zero, as explained here: http://stackoverflow.com/questions/5381 ... s-in-box2d

Elsewhere on this forum, someone had what I think was the same problem. They claim to have fixed the problem by setting friction of all fixtures to zero. I've tried this, but it doesn't seem to fix my problem. Is there some way to access a World's velocityThreshold that I'm not seeing?

Edit: Read the "how to ask for help" thing and realized I hadn't posted a .love file. I have now added one - most of my crap is still lying around in it, but I've added some on-screen prints and adjusted the initial conditions to demonstrate the problem. Note that the horizontal velocity is preserved through the bounces but drops immediately to exactly 0 when hitting the wall, showing friction is not the problem.
game.love
(1.95 KiB) Downloaded 120 times

Re: Pong: Balls stick to Walls (Box2D solution exists)

Posted: Thu May 23, 2024 1:31 pm
by pericles
Sorry for the necropost.

Do anyone know if there is a way to fix this problem ^^'?
I encounter it years ago and was wondering if someone found a solution.

Re: Pong: Balls stick to Walls (Box2D solution exists)

Posted: Fri May 24, 2024 6:25 pm
by dusoft
Maybe resolution, but that's just my guess. Also using LOVE from 2015 and today will likely have different results.