- Home /
How to get a ball with physics2d to move instead of spin?
I have created a simple 2d scene as follows:
Sprite with a "Box Collider 2D" set at an angle to create a ramp
Sprite with a "RigidBody 2D" and a "Circle Collider 2D"
I place the circle above the ramp and press play, I want the circle to move based on rotations, one rotation would move the circle the circumference of the circle.
What I observe is that the circle builds a lot of rotational velocity, slides along a little bit, but and ends up more or less spinning on the spot.
As an extension to this, I want to be able to move the ball left and right along the screen using the arrow keys.
I've set up a "FixedUpdate" event which adds either "Force" or "Torque" to the circle, and experience the same thing where the circle moves a little but mostly spins on the spot.
I have tried adding more mass, I've tried setting a physics material on both the ground and the circle and tried various friction settings.
How do I get the circle to move (give or take) the distance of the circumference each time it spins?
Let me know if you need any more details, or code, or exact settings. I'm just looking for some direction with what setting to change here.
Answer by ash47 · Jun 05, 2020 at 05:04 AM
I ended up just recreating it from scratch, and it works now. I have zero idea what was wrong before. It works now though :/