How do I stop damping occurring?

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
Spankenstein
Posts: 249
Joined: Wed Nov 17, 2010 1:49 pm

How do I stop damping occurring?

Post 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?
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: How do I stop damping occurring?

Post 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.
Spankenstein
Posts: 249
Joined: Wed Nov 17, 2010 1:49 pm

Re: How do I stop damping occurring?

Post by Spankenstein »

Thank you :)
Post Reply