u r a genius!
thanks!
i used method one
[code]xMagnettransform = xMagnet*cs+yMagnet*sc;
yMagnettransform = -xMagnet*sc+yMagnet*cs;
xCompasstransform = xCompass*cs+yCompass*sc;
yCompasstransform = -xCompass*sc+yCompass*cs;



if ( magnetNS==false&&xCompasstransform<(xMagnettransform+Magnetsizex/2) && xCompasstransform>(xMagnettransform-(Magnetsizex/2)) && yCompasstransform<(yMagnettransform+Magnetsizey/2) && yCompasstransform>(yMagnettransform-Magnetsizey/2))
{
test = true;
b[0] = (225*cs)*vectorfieldmaxopposite/100;
b[1] = (225*sc)*vectorfieldmaxopposite/100;
}[/code]
it works so beautifully now. ;D alright man super!!

crap, introduce some other bugs, gotta look at it closer again haiz