Problem with RigidBody 2D and Gravity

Hi,

I made a simple 2d sprite animation and applied a RigidBody 2D to it in the Inspector. I rigid body left the Gravity as 1 (I am assuming 1 represents the 9.81 m/s2). Also I saw someone leave it as 1 in an online tutorial and it worked fine for them. I posted a pic of what I did below in the email -

Anyway I experienced two problems -

  1. When the value is 1 my character falls very very slowly to the ground very very slowly. I know what you are thinking, I should change it to 10. However if I do this it does fall normally like in real life… but… which brings me to 2…

  2. I want to apply a upward force to make the character jump, which means I have to apply a huge force like 2000 (when using ADD FORCE 2D) when g = 10.

Also when the force is so high the character just JUMPS so fast he just reaches the highest point so fast you does see him move in between… what could I possibly be doing wrong… on the online tutorials I am following exactly what they did and for me its just not working … any ideas?

Sounds like your object has a huge scale.

Remember - large objects appear to fall slowly, simply because you have to view them from very far away to see them moving.

How big is your object beside a primitive cube that’s 1 x 1 x 1?

Hello, SarfarazzAlladin,

I posted a picture below to compare my character (which is a snake) coompared to a 1x1x1 cube. The cube is black. The cube falls normal when a gravity of 1 is applied btw :s … any ideas again?

So, I was way off base with my first assumption:face_with_spiral_eyes: Sorry about that!

I guess the only other thing I can think of is your animation. Is it possible that its messing with the y position of the character? Does the character fall normally when you strip away the playmaker + anim stuff?

Try disabling one component at a time maybe and try to isolate where the trouble is coming from.

SarfarazzAlladin,

Well you were right. It was the the Playmaker Script Component. But why? I mean My script is a very very simple playmaker script and has NOTHING to do with gravity… why would it affect the gravity…??? plus i need the playmaker script AHHH this is so confusing

I’m sure you’ll find the problem :slight_smile: Do the same sort of investigation on your playmaker script. Disconnect one node at a time between testing to narrow down where the trouble is coming from.

hey I figured it out. In the playmaker script I had to unckeck the vector option in set Velcoity 2D… it took me over an hour sigh … but thanks very much for the advice SafaraazAlladin … muchas gracia

1 Like

Thank you SO MUCH for posting this. I’d just finished my own hour of wondering what the F was going on.

Same issue, using same tutorial! Thank you for posting your solution !