Menace of the Infinitely Spinning Box2D Polygon

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
User avatar
Gold_Car
Prole
Posts: 24
Joined: Thu Jan 01, 2015 2:07 am

Menace of the Infinitely Spinning Box2D Polygon

Post by Gold_Car » Tue Oct 16, 2018 12:46 am

Previously I made a game about a jointed Box2D object due to my limitations as a developer at the time, and that player character had a system of control that turned out to be something of a darkhorse, so I'm using Box2D in this indirect sequel too.

The only problem is, something weird can happen whenever you control this character for long enough. Eventually, once you've spun around enough, the character can start snowballing and spin faster and faster until it's practically a strobe, even when no buttons are being held down. It's actually kinda hilarious. But needless to say, you should not play this love file if you have epilepsy.

Currently this game is in the early character testing phase so I can get controls polished and comfy like they were in my other Box2D game, but I can't get any further until this bug that makes it spin like utter insanity is dealt with, and I've tried almost everything to make it go away.

Do you know what might be causing this? Testing file enclosed.
test_share.love
(1.99 MiB) Downloaded 11 times

User avatar
pgimeno
Party member
Posts: 1343
Joined: Sun Oct 18, 2015 2:58 pm

Re: Menace of the Infinitely Spinning Box2D Polygon

Post by pgimeno » Tue Oct 16, 2018 2:50 am

I think that the problem is that you're creating weld joints of interpenetrating bodies. It's not the first time I see such a system go crazy.

Try creating a single body with multiple shapes/fixtures instead.
Thrust II Reloaded - GifLoad for Löve - GSpöt GUI - My NotABug.org repositories - portland (mobile orientation)
The MS-Github repositories I had have been closed after the acquisition announcement and will be removed in the near future.

Post Reply

Who is online

Users browsing this forum: Exabot [Bot] and 17 guests