Re: Speculative Contacts
Paul Firth <[email protected]> Fri, 1 Apr 2011 09:14:06 +0100
| Newsgroups | gmane.games.devel.algorithms |
|---|---|
| Message-ID | <[email protected]> |
> 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: [email protected] ------------------------------------------------------------------------------ Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf _______________________________________________ GDAlgorithms-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list Archives: http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list