- Home /
Slow down a rigidbody(sphere) while moving
I wasn't sure what I should write in the title.. So, I have a sphere, moving around on some cubes. It's some kind of a Marble game. Now I'm stuck a bit on the physics.
It's hard to handle the ball when I try to move to the opposite of the current direction. I tried to stop the velocity at a specific amount.
if (rigidbody.velocity.magnitude <= 0.5) {
rigidbody.velocity = new Vector3(0, 0, 0);
}
That worked so far. But It isn't what I want. I was thinking of a movement like in the old SuperMario on the 64. You can run in one direction, but if you decide to walk back very fast, Mario just negative the number of his speed till he stops.
At the end, the player should be able to jump on another cube, without falling off.
I'm sorry if this sounds confusing. It isn't my native language.
Do you guys have any idea how this could be done?
EDIT: I have increasing the angular drag and the sphere stops faster. Good. But now it looks like walking on ice. That doesn't look good. Is there a better way?
Your answer
![](https://koobas.hobune.stream/wayback/20220613161758im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Keeping momentum with rigid bodies. 0 Answers
My objects are falling to slowly when a rigidbody is attached, cab you help? 9 Answers
Linear Velocity 1 Answer
instantiated objects have different speed 1 Answer
Comparing rigidbody speeds 1 Answer