Rigidbody2D no longer affected by gravity? Block Breaker

I finished watching the series for this game and I am now trying to develop it further, I tried adding a falling power up but gravity doesn’t seem to work? I created a circle sprite and attached a Rigidbody2D component to have it fall but it just stays there. static in mid air where I placed it.

Am I missing something? Did we do something to completely turn off the gravity? I looked through the scripts and I didn’t see nor do I remember hard coding the gravity.

Thanks! :slight_smile:

Hi Vorundor,

We set the gravity to 0 in the Physics2D Settings. You could either set it to -9.81 (or another negative value) again, or you could give your power up game object a velocity, e.g. new Vector3(0f, 1f, 0f).

OMG! I had COMPLETELY forgotten where to access that lol. Thank you Tina! I’ll add a velocity to the power up game object, I’ll keep the gravity at 0. Now that I know what I missed, I think I can figure out the rest :).

Thanks again Nina! You’re a life savior!

I’m glad I was able to help you. :slight_smile:


See also:

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms