Page 1 of 1
Changing environment drag settings?
Posted: Sun Sep 25, 2011 10:16 pm
by Spankenstein
If I fling an object around at zero gravity then it will eventually come to a stop.
Is there a property that I can use to increase/decrease environment drag for all objects?
Re: Changing environment drag settings?
Posted: Sun Sep 25, 2011 10:16 pm
by Norbo
Not all objects at once, but all entities have their own LinearDamping/AngularDamping setting.
Re: Changing environment drag settings?
Posted: Mon Sep 26, 2011 10:34 am
by Spankenstein
I've set all objects to 0 for both LinearDamping & AngularDamping but they are still slowing down. Do I have to change their coefficient of restitution to 1 as well?
Is there anything else I will have to take into consideration for them to keep the same speed at which they were initially given and never slow down?
Re: Changing environment drag settings?
Posted: Mon Sep 26, 2011 9:05 pm
by Norbo
Do I have to change their coefficient of restitution to 1 as well?
If objects are colliding a bunch, then yes.
Is there anything else I will have to take into consideration for them to keep the same speed at which they were initially given and never slow down?
If the objects are moving slower than a configurable velocity threshold, then they will be slowed by the deactivation system. This can be turned off by setting the Space.DeactivationManager.UseStabilization to false. Individual entity.ActivityInformation.AllowStabilization properties can also be used to only turn it off for some entities.
Collisions will introduce complexity which is hard to track. Speeds will change over time due to the collisions, but the energy should be roughly conserved if the coefficient of restitution is 1. The total measured energy of the system will likely change over time with continued collisions either a bit up or a bit down, but it should be close enough that it doesn't matter for almost all simulations.
Re: Changing environment drag settings?
Posted: Mon Sep 26, 2011 9:10 pm
by Spankenstein
Wonderful stuff. Thanks
