Weird gravity flip bug

Bugs will be moved here once resolved.

Post » Mon Mar 19, 2012 12:44 am

First off: specs. Standard edition, Windows 64bit, on a Macbook Air (yes, Windows on an Air). Video card is a Nvidia GeForce 320M.

I've been working on a platform game where you have a jetpack. Since platform and physics don't play nice together, I couldn't use forces for the jetpack, so I just decided to adjust gravity instead.

What I noticed, though, is that if you set gravity to, say, -300, when SPACE is pressed, and then have another event to set gravity to 300 when SPACE is not pressed.

What I find is that the not pressed event never picks up, as shown in the .capx below.

Download Here

This bug only occurs, though, when the values are exact opposites. If you set gravity to -299 on SPACE pressed, and 300 when not pressed, there is no problem, and we get the expected behavior. It's almost like there is a check for identical value before the system tries to swap gravity, but the check is only comparing absolute values.

Hope this helps!
Posts: 10
Reputation: 520

Post » Mon Mar 19, 2012 3:36 pm

Should be fixed in next build, thanks for the report!
Scirra Founder
Posts: 22,822
Reputation: 176,640

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 0 guests