Glen Pike skriver:
Hi,
Can you measure the vector distance between the centre of the polygon
and the centre of the ball? If that is 0,0, and the diameter of the
circle is less than the smallest of width / height of the box, then you
are inside.
Glen
Not in all cases:
http://img694.imageshack
m] On Behalf Of Glen Pike
Sent: 16 June 2011 15:26
To: Flash Coders List
Subject: Re: [Flashcoders] Detecting if line crosses movie clip
I am not sure - do you mean "single line" like a circle, or a single
line as in straight one?
My idea was to test if a circle was inside a rectangle,
t: 16 June 2011 14:48
To: Flash Coders List
Subject: Re: [Flashcoders] Detecting if line crosses movie clip
Hi,
Can you measure the vector distance between the centre of the
polygon and the centre of the ball? If that is 0,0, and the diameter of
the circle is less than the smallest of width /
: Flash Coders List
Subject: Re: [Flashcoders] Detecting if line crosses movie clip
Hi,
Can you measure the vector distance between the centre of the
polygon and the centre of the ball? If that is 0,0, and the diameter of
the circle is less than the smallest of width / height of the box, then
Thanks Paul - that looks awesome and just what I need
-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Paul Andrews
Sent: 16 June 2011 14:48
To: Flash Coders List
Subject: Re: [Flashcoders] Detecting if line
Hi,
Can you measure the vector distance between the centre of the
polygon and the centre of the ball? If that is 0,0, and the diameter of
the circle is less than the smallest of width / height of the box, then
you are inside.
Glen
On 16/06/2011 13:58, Paul Steven wrote:
Working on
On 16/06/2011 13:58, Paul Steven wrote:
Working on a game where the player must draw around some colored balls on
screen by dragging the mouse to create the polygon that surrounds the
objects.
The polygon is created by drawing a series of lines every time the mouse
moves. If one of these lines i
Working on a game where the player must draw around some colored balls on
screen by dragging the mouse to create the polygon that surrounds the
objects.
The polygon is created by drawing a series of lines every time the mouse
moves. If one of these lines intersects one of the balls (movie clip) I
8 matches
Mail list logo