Hello,
I've made an Entity with LinearDampening set to 0 and ActivityInformation.IsAlwaysActive set to true. However when the object is moving at a very low velocity (at .2 units per second) The object starts to bleed velocity. The velocity approaches zero but never completely reaches it.
Unwanted deceleration
Re: Unwanted deceleration
That's caused by the deactivation system attempting to stabilize the simulation. It saps energy out of slow-moving objects to pull them into complete deactivation faster. It's active by default even for always-active objects for consistency in behavior, but it can be disabled by setting the entity.ActivityInformation.AllowStabilization = false.
It can also be disabled across the board by setting the Space.DeactivationManager.UseStabilization = false.
It can also be disabled across the board by setting the Space.DeactivationManager.UseStabilization = false.
-
- Posts: 54
- Joined: Fri Mar 11, 2011 11:44 pm
Re: Unwanted deceleration
Alright, thanks for the info.
-
- Posts: 54
- Joined: Fri Mar 11, 2011 11:44 pm
Re: Unwanted deceleration
Since I want None of my entities to be deactivated I've been looking for a way to turn of the Deactivation manager completely. Setting Enabled to false seems to stop Simulation Islands from falling apart when Entities leave each-other's vicinity. I thought of setting MaximumDeactivationAttemptsPerFrame to zero, but looking at the code it seems to me that this would stop Orphaned Simulation Islands from being removed.
Re: Unwanted deceleration
The easiest option is to set IsAlwaysActive to true for all the objects. Conceptually, the simulation islands would become unnecessary, but disabling them completely in practice is probably more work than it's worth.