Weird gravity flip bug

0 favourites
  • 2 posts
From the Asset Store
Goodbye to sprite fonts, when you have something new on the anvil for your upcoming Games !
  • 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!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Should be fixed in next build, thanks for the report!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)