[ODE] Re: sampling to determine sleeping

Peter twentyseven at urbanterror.net
Thu Sep 16 09:08:03 MST 2004


Aside from my personal opinion on using island heuristics or not and macro
level "sleeping", I still think theres a fairly good case for filtered
reading of the angular and linear velocitys for sleeping via some standard
statistical analysis.  My only tip in this regards is that calculating a
smoothed "score" over time does not mean you have to keep a record of all
values that contribute to it;
In the case of something like a simple moving aveage you can simply keep the
score of the previous frame, and add an appropriate adjustment to it - which
would keep the cost almost the same as the current unfiltered implementation
except for a couple of adds and muls extra, no loop.





More information about the ODE mailing list