Too high gravity in my game?

0 favourites
  • 9 posts
From the Asset Store
20 high quality click sounds, ready to improve your game's UI instantly
  • Hi!

    I'm making a physics based game. and I have a problem.

    The world gravity has to be 80 for this game to be any good. I've tried changing "player" density and other settings, but it doesn't feel right,

    But having this gravity makes my "player" vibrate on the ground, and therefore the collision check triggers all the time, making it useless in using "on collision" for sound etc.

    The game works fine otherwise. No other physics problems.

    Any help, tips, tricks, or ideas are very appreciated!

  • There's no reason for physics-based objects to vibrate, even with gravity set to 1000. Do you have any other behaviors on the player object, like platform movement? Any non-physics-based movement will seriously mess with the physics behavior.

    PS: A way to fake additional gravity on an object is to apply a downward force to it every tick.

  • Also check you player collision boxes if you're running an animation.

  • Thanks for replying.

    I have only one frame in this sprite, and I use "Circle" collision mask. (it doesn't help changing this"

    It behaves this way even with a new project, made as simple as can be.

    Here's how to reconstruct my problem.

    Create a new project with a layout size of 4320 x 7680

    Create one sprite with size 80 x 80 px -> Give it the physics behavior.

    Create a tiled background -> Give it the physics behavior, and set to "Immovable"

    Add event: OnStartOfLayout -> SetWorldGravity to 80.

    Add event: Sprite -> OnCollision (with TiledBackground) -> Play Sound.

    Drop the sprite over tiled background and run project.

    (To see the actual shaking, set the layout scale to 3, as I have it in my game)

  • I just did exactly what you described, and I see no jittering. c3p file: we.tl/t-2nXedOGIQc

  • Strange this.. Opened your Capx, and here's a video of my screen. (No audio in the video, but it was triggering rapidly non-stop)

    filetransfer.io/data-package/p7tA10nN

  • Have you tried increasing values in "Set stepping iterations" action? This can improve physics calculations and fix the jitter.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I just tested this in multiple browsers, multiple devices, and different refresh rates. When running at 60fps or less, the jitter happens. The physics object never enters a sleep state. The results are consistent, so I think this might be a bug.

    (You can test this yourself by setting framerate mode to unlimited in project settings)

  • Submitting a ticket then.

    Thanks for the good help, I appreciate it!

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