How do i make a magnetic like field like effect...

like set a distance in which an actor can pass because of distance restrictions, similar to a magnet
looking for a boundry type effect to keep the actor from hitting the other actor
looking for a boundry type effect to keep the actor from hitting the other actor
Comments
http://www.purplemath.com/modules/distform.htm
Constrain the x and y of each object, then constrain a new distance variable as the result of the distance formula.