I have an example case here, https://jsfiddle.net/DivMaster/qhzwu4vt/11/
when you move red pointer closer to the black polygon, it moves black polygon to the opposite direction, is it possible to not move the position of black polygon, just reduce the black polygon size? so for example if the red pointer touches on 'left top' of polygon, it should move that point to +10px on opposite side, not move the whole polygon.
it is my starting point with geometry and all this collision detection , and would appreciate any help.
I have an example case here, https://jsfiddle.net/DivMaster/qhzwu4vt/11/
when you move red pointer closer to the black polygon, it moves black polygon to the opposite direction, is it possible to not move the position of black polygon, just reduce the black polygon size? so for example if the red pointer touches on 'left top' of polygon, it should move that point to +10px on opposite side, not move the whole polygon.
it is my starting point with geometry and all this collision detection , and would appreciate any help.