- Home /
Question by
semnickolas · Apr 29, 2014 at 05:31 AM ·
gravityrigidbody 2d
rigindbody2D and gravity vector!?
How I can change gravity vector for rigidbody2D from y to x? C# code examples would be appeciated.
Comment
Answer by robertbu · Apr 29, 2014 at 05:32 AM
I believe you can do:
Physics2D.gravity = new Vector3(9.81f,0);
You may need -9.81. I'm unsure which direction you want as gravity.
Oh man, ty so much! I used Physics.gravity before(and this not working).
Your answer
![](https://koobas.hobune.stream/wayback/20220613143831im_/https://answers.unity.com/themes/thub/images/avi.jpg)