[L2Ork-dev] coords and hitbox in [canvasinfo]?

Jonathan Wilkes jon.w.wilkes at gmail.com
Sat Dec 7 18:10:54 EST 2019

On Fri, Dec 6, 2019 at 5:47 PM Alexandre Torres Porres <porres at gmail.com> wrote:
> Em sex., 6 de dez. de 2019 às 16:02, Jonathan Wilkes <jon.w.wilkes at gmail.com> escreveu:
>> Those are some convenience methods I added, possibly for the Purr Data
>> testing framework.
> So no actual use case for them?

Given that you maintain the 2nd largest external library I hope you
will consider that
enabling automated tests obviously qualifies as an "actual use case."

As for the "hitbox" method-- it not only tests if there is an object underneath
the given coordinate, but it also returns a list of objects if they
happen to lie
under that coordinate. Pd itself leverages that algorithm for its
graphical editor,
so that should tell you that there are plenty of use cases for it.

For example, there's a demo game that ships with Purr Data that uses that
method so that a character can interact with the objects in each level.


>> You'll have to have a look the "coords" canvas method and
>> "canvas_hitbox" function in the inner workings of a Pd canvas
>> to make sense of them.
> ok, I get it now
>> > I tried coords inside an abstraction, for instance, and didn't get any useful thing, just a list of zeros.
>> For a non-gop abstraction I believe that is the expected output.
> Yup, seems like something that could be useful, but I wouldn't know of any use case...
> _______________________________________________
> L2Ork-dev mailing list
> L2Ork-dev at disis.music.vt.edu
> https://disis.music.vt.edu/listinfo/l2ork-dev

More information about the L2Ork-dev mailing list