Re: [Algorithms] Speculative Contacts
Brought to you by:
vexxed72
From: Paul F. <pa...@wi...> - 2011-04-01 08:42:13
|
> This is pretty cool! Thanks for sharing. No probs :) > What I've found when doing the "remove velocity" thing in the past (sweeping > spheres against trimeshes, mostly), is that the amount of bounce you get (if > you have >0 restitution) varies randomly. The reason being that "almost all" > versus "almost none" of the velocity will be removed for any given timestep, > depending on how soon within the timestep the object will intersect the > target. I have to admit, i've never tried this solution with a physics engine which supported non zero restitution - none of the games i've worked on have called for it :) > It's possible to hack with things like "assumed velocity" being remembered > at the beginning of the time step -- do you have any thoughts on possibly > better solutions? I not totally sure - you could always calculate what the 'restitution portion' of the resulting velocity would have been and then just add that back on as a target in the constraint solver, but i've no idea if that would actually work :) > (There's also the discontinuity in motion from removing a random amount of > time, but as you say -- you gotta stop somewhere ;-) It ends up being less of a discontinuity and more like a relaxation of the response over a couple of frames - the more iterations you run, the more resolved the final solution as ever :) Cheers, Paul. -- Paul Firth http://www.wildbunny.co.uk http://www.facebook.com/WildbunnyLtd email: pa...@wi... |