playMaker

Author Topic: 2D Rigidbody flying away when gravity enabled  (Read 3761 times)

JoeGameDev

  • Playmaker Newbie
  • *
  • Posts: 15
2D Rigidbody flying away when gravity enabled
« on: December 02, 2023, 05:08:33 PM »
I’m really at a loss here.

I had (months ago) set the 2D gravity settings at 0 for this reason, but right now I’m making a stage that emulates a 2D platformer and I need to be able to jump and retun to the ground, which requires gravity.

However, when I enable gravity on my project, anything with a rigidbody 2D flies or floats up and away (depending on how strong I have gravity set. I’ve made sure I have no overlapping colliders. To test this for sure I started a new scene, used a plain sprite background, a character sprite to apply a rigidbody2D to, and turned on the gravity. No code, no colliders, just sprites and one RB. For whatever reason, it flies away no matter what.


I even tried changing my RB to kinematic, which kept me on the ground but took away my jump.

I’m lost. I’ve included a screenshot of my project settings. It’s possible I screwed with them unwittingly, as I’ve only used Unity for the last year or so while working on a small personal project and haven’t gotten a proper education on how it all works.