Chain-collisions
Moderator: Moderators
Re: Chain-collisions
i'm not sure we need verlet integration, it comes with a cost after all. i'd say that we should a) increase/add a damping factor during collisions and b) ignore collisions below certain energy.
Re: Chain-collisions
If those collisions and forces are not calculated using verlet integration how are they calculated?
Re: Chain-collisions
Euler integration + hacks.
Re: Chain-collisions
So the errors in the Eular method are whats causing the crazy impulse and units flying all over the map?maybe take smaller steps in the samples?
Re: Chain-collisions
No, mostly the crazy values are a result of 1) explosions (from weapon impacts) adding an amount of impulse which, if large enough, puts units into a "skidding" state, and 2) a unit's residual impulse only being decayed every 16 frames by some arbitrary fudge factor. The skidding part is what then causes the runaway impulse; every frame that two nearby skidding units are seen as colliding, both receive damage and additional impulse that is a combination of the impacting units' speeds and masses.
Re: Chain-collisions
Units mass values are just too small, as a result we have lots of hacks and fixes for this, and the result is a great big mess.
Re: Chain-collisions
Something this incredibly extensive shouldnt be a gadget, surely...
I suppose mygravity for units will be in the next spring release?
I suppose mygravity for units will be in the next spring release?
A skidding unit striking a stationary unit will put that unit into a skidding state also, the way you phrased it made it sound like only weapon impacts can start a unit skidding.explosions (from weapon impacts) adding an amount of impulse which, if large enough, puts units into a "skidding" state... ...every frame that two nearby skidding units
I suppose this is to prevent units ending up inside eachother? The violation of newtons third law aside, is there any chance the extra impulse could be toned down?...the runaway impulse; every frame that two nearby skidding units are seen as colliding, both receive... ...additional impulse that is a combination of the impacting units' speeds and masses.
Dont know what you mean by this, chucking a few zeroes on the end of mass values and on the end of impulse values doesnt change a thing (though ironically, chucking a few zeroes on the end of HP means units take a LOT less falling damage- fall damage is flat, based on mass and impulse). Unless you mean impulse values are too high, which is patently untrue of most mods (usually they are zero).Units mass values are just too small, as a result we have lots of hacks and fixes for this, and the result is a great big mess.
Re: Chain-collisions
i pushed a change that makes residual impulse decay every frame and made collisions not conserve momentum (by a factor of 0.5). those two tweaks helped, but ultimately modders should test them.Kloot wrote:2) a unit's residual impulse only being decayed every 16 frames by some arbitrary fudge factor. The skidding part is what then causes the runaway impulse; every frame that two nearby skidding units are seen as colliding, both receive damage and additional impulse that is a combination of the impacting units' speeds and masses.