Constrains to poligon?

Create fast, sprite powered games with Animation Engine, co-developed with DerBrill Software!

Moderators: heatherlaine, kevinmiller, robinmiller, malte

Post Reply
JosepM
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 344
Joined: Tue Jul 20, 2010 12:40 pm

Constrains to poligon?

Post by JosepM » Mon Dec 20, 2010 1:01 am

Hi,

It's posible to set the constrain to a poligon area? I've been reading the aengine docs but I don't found any. It's posible in some way?

Salut,
Josep

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Location: Ostenfeld germany
Contact:

Re: Constrains to poligon?

Post by malte » Mon Dec 20, 2010 7:34 pm

Not yet, but I Want that too. However this is a tad bit complicated...

I would need to know how this should behave. It should be fairly simple to constrain the location of the dragged object, checking for the boundaries of any given dragged object in an n-sided polygon is not a trivial matter though.

Cheers,

Malte

JosepM
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 344
Joined: Tue Jul 20, 2010 12:40 pm

Re: Constrains to poligon?

Post by JosepM » Mon Dec 20, 2010 9:33 pm

Hi Malte,

Maybe pointInPoly(x,y,pointlist) will be my friend, so I need to check if the tokens are inside of x zones, and these zones all are polygons.
Better check with pointInPoly or with the intersect?

Salut,
Josep

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Location: Ostenfeld germany
Contact:

Re: Constrains to poligon?

Post by malte » Wed Dec 22, 2010 10:09 am

If you want to constrain an object pointInPoly indeed is your friend. If you only want the location costrained this should be pretty straightforward.


All the best,

Malte

JosepM
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 344
Joined: Tue Jul 20, 2010 12:40 pm

Re: Constrains to poligon?

Post by JosepM » Wed Dec 22, 2010 2:05 pm

But how I can check all at the same time? I mean, the user move tokens over the board and I need to check where the tokens are,.. what is the technique to control all at same time?

Any tip?

Salut,
Josep

Post Reply

Return to “Animation Engine”