- Home /
Change a specific Gameobjects rigidbody gravity to horizontal (left)
Hey guys im new with Unity. Right now im trying to make a 2D game. I have a Gameobject (a ball) with a Rigidbody component but i want only this gameobject to be pulled to the left, just like when the rigidbody standard gravity pulls it down. I know how to do it in the menu under edit - project setting - ..., but that will set alle rigidbody to have the same gravity direction which is a problem in my case. Hope u guys can help thx u.
You can continually add a force each 'FixedUpdate' callback to the Rigidbody2D component. Alternately, if you're using Unity5, you can add a ConstantForce2D component and set a force there.
Answer by Ekta-Mehta-D · Apr 16, 2015 at 11:14 AM
You need to give rigid body force to left direction.
Your answer
Follow this Question
Related Questions
Need suggestion for tossing game 0 Answers
Physics2D Overlapbox not working as aspected 0 Answers
Ball bounces at different heights when it shouldn't 0 Answers
2D Character won't jump diagonally 1 Answer
Horizontal attraction? 0 Answers