[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Re: Hexagonal collision detection?



On Wed, Sep 16, 2009 at 1:14 PM, rygoody <rygoody@xxxxxxxxx> wrote:
> Alright NEVERMIND about explaining it. I spent like the past hour
> studying this and figured it out.
>
> I gotta say, this is like the most brilliant function ever for this. I
> would have never thought of this.
> I understand that its something like, the relationship of area between
> two squares drawn to intersect at the diagonal line between them will
> make one square bigger than the other when your on a certain side of
> the diagonal line at any point along the diagonal line.
>
> Where did you get this from? Is this all your own idea or is this kind
> of function described elsewhere?
>
> I think this should really be standard in the pygame module. You ever
> consider implementing it as C in the pygame source? Or mind if someone
> else does?
>

Definitely, that would be an awesome addition for pygame :)

Now sure where it would go currently.  Probably in the sprite module
with the other collision functions at the moment.  Or perhaps in a
more general pygame.shape module... or maybe in a pygame.collision
module.

cheers,