Cheers Bob.. but that was probably a bad example as i've implemented it
using the mouse position myself but it's not really ideal as what i want to
do is ensure the position of a paddle is inside of a player's region.
Since the mouse controls the paddle.. i assumed simply using the mouse
positions with Region.IsVisible would work. But if you move the mouse
quickly outside of the region, it won't redraw it where it should (at the
edge of the region).. it'll simply freeze at the last place it was drawn.
I should really be using the X and Y position of the paddle but that does
not seem to work.. as the paddle will stick as soon as it goes outside of
the region, with no way to move it back inside the region (as it's already
outside, you're disregarding any movement it's attempting).
Quite difficult to word there.. and probably more difficult to understand.
The code i was using for the mouse position was:
Point paddle1Position = new Point(e.X, e.Y);
bool isVisibleInP1Reg = player1Rgn.IsVisible(paddle1Position);
if(isVisibleInP1Reg == true)
{
paddle1_x = e.X;
paddle1_y = e.Y;
}
else
{
//do nothing
}