Is there a solution to this?
Also, I seem to have an issue where calling following can result in the Sphere's speed apparently continuously increasing, while position remains the same and it not accepting any further impulses.
Code: Select all
void Stabalise(float dt)
{
Vector3 v = -Rigidbody.LinearVelocity;
if (v.Length() > 0.1)
{
if (v.Length() > (dt * Speed))
{
v.Normalize();
v *= (dt * Speed);
}
Rigidbody.ApplyLinearImpulse(ref v);
ForceApplied = true;
}
}