- Home /
Rigidbody sphere slows down quickly
I have a plane without any physic material, and a sphere (Physic material also set to None)
Vector3 moveVector = clickedPosition - rigidbody.position;
rigidbody.AddForce (moveVector, ForceMode.Impulse);
Sphere starts to move on mouse click and it works. But i can't understand why it slows down so quickly.
Video: https://drive.google.com/file/d/0B1fx5ANOw2asaVl3clZLMUFmaUU/view?usp=sharing
After AddForce sphere starts to move fast but some seconds later it slows down very quickly but continues to move at very low speed.
I've already tried:
Change mass, Drag, Angular Drag, change physic material (both sphere and plane), Physics Manager (Sleep Threshold) but with no luck.
I expected that after applying a force sphere's slowing should be more smooth, or "linear", but now i see a sharp slowdown at the end of the moving. I can't explain it correctly, it is shown in video.
I think i am doing something wrong.
Answer by badadam · Jan 13, 2019 at 10:17 PM
Use this code.
Vector3 moveVector = clickedPosition - rigidbody.position;
moveVector.Normalize();
rigidbody.velocity = moveVector * speed;
And set drag value of rigidbody to determine slowing time with trial and error
Answer by Raptosauru5 · Jan 13, 2019 at 09:54 PM
I am having the same kind of problem. I am actually driving a ball down the ramp and it speeds up as it goes down, but when on flat surface, it quickly slows down to low speed and then it almost stops slowing down and maintains that velocity. It feels like if there was some speed limit to the rigid body, so the game slows it down to acceptable speed. (the speed going down the ramp isn't any exciting tho). Feels like something wrong with the physics. I tried to change plenty of settings without luck