Path: chuka.playstation.co.uk!news From: "Alex Herert" Newsgroups: scee.yaroze.programming.2d_graphics Subject: Re: Collision detection with rotating sprites Date: Sat, 12 Dec 1998 13:41:01 -0000 Organization: PlayStation Net Yaroze (SCEE) Lines: 23 Message-ID: <74trtj$1s7@chuka.playstation.co.uk> References: <01be1d86$03a1a160$0a3ddec2@guildfoc> <742u50$9lv3@chuka.playstation.co.uk> <01be1e90$e7e94160$0a3ddec2@guildfoc> <746eq9$c3e2@chuka.playstation.co.uk> <3666DDF3.EBEFDB1E@cthullu.freeserve.co.uk> <01be1ef5$5bfd4ba0$LocalHost@guildfoc> NNTP-Posting-Host: th-usr01-29.ndirect.co.uk X-Newsreader: Microsoft Outlook Express 4.72.3110.1 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Miles Buzzing wrote in message <01be1ef5$5bfd4ba0$LocalHost@guildfoc>... >Yes, I've had a go with some broad tests. The method I use is less accurate >that yours, but probably faster - check a bounding square based on the >longest axis of the sprite first and then use a more precise bounding >sphere test (using the anti-christ of fast code - Sqrt). > >I like bounding spheres but there is just no quick way to calculate square >root as far as I can see. Even with a fixed point maths routine I still >have to perform at least 12+ iterations to get an reasonable approximation >of sqrt. Has anyone out there found a really quick and dirty way of >calculating it? Yep. Don't bother with any form of sqrt. Just compare squared values instead (i.e. square the value you're comparing with). It don't get much quicker than that! :) Herbs