Pong: Balls stick to Walls (Box2D solution exists)

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
Mongoose1021
Prole
Posts: 1
Joined: Mon Dec 14, 2015 12:34 am

Pong: Balls stick to Walls (Box2D solution exists)

Post 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 110 times
pericles
Prole
Posts: 12
Joined: Tue Dec 25, 2018 6:31 pm

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

Post 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.
User avatar
dusoft
Party member
Posts: 539
Joined: Fri Nov 08, 2013 12:07 am
Location: Europe usually
Contact:

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

Post by dusoft »

Maybe resolution, but that's just my guess. Also using LOVE from 2015 and today will likely have different results.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest