On 11/29/06, zz zz <[EMAIL PROTECTED]> wrote:

>Again just curious: When I thought about an own engine (a long while ago)
I
>had the idea to use "hitbubbles" instead of hitboxes, so I don't need to
>check whether something is between all sides of the box, but only need to
>compare the distance to the mid of the bubble with the radius.
>Why is this not a good approach, or: Why didn't you choose this approach?
isnt distance calculation more costy(esp 3D vector ones) than few >=
comparisons?
anyway I didnt create that hitbox check,I just added tarZ0 and tarZ1 to
make
sure it works for VTOL's.


You can always do the cheap rectangular hit box check first, and then only
do the radius check if that indicates a possible hit - should be fairly
cheap since most objects are going to be clear misses (until you start
lobbing nukes from your 3 turret mega-units).  Basic clipping-style tests.

(And of course you compare squares of the distance, rather than bothering to
squareroot each side of the equation)

--
- Gus
_______________________________________________
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev

Reply via email to