Page 1 of 1

How do I stop damping occurring?

Posted: Fri Apr 15, 2011 9:32 pm
by Spankenstein
If I create a sphere entity:

Code: Select all

            entity = new Sphere(Vector3.Zero, scale.X * 0.5f, 1f);
            entity.IsAffectedByGravity = false;
            entity.LinearVelocity = direction * speed;
How can I prevent the sphere's velocity from gradually slowing towards 0, which I presume is something to do with damping?

Re: How do I stop damping occurring?

Posted: Fri Apr 15, 2011 10:23 pm
by Norbo
Entities have LinearDamping and AngularDamping. Setting them to zero will prevent it from losing velocity.

There is one situation where it could still be damped though- if the Space.DeactivationManager.UseStabilization is true (it is by default), very low-speed objects will be damped while trying to deactivate. If the object is above the deactivation velocity threshold, no damping will be applied.

Re: How do I stop damping occurring?

Posted: Fri Apr 15, 2011 10:34 pm
by Spankenstein
Thank you :)