Gravity is a force that is calculated by:
F_G = gamma * mass1 * mass2 / distance^2
Where gamma is the gravity constant and mass1 and mass2 are the objects' masses. You get the resulting acceleration with:
F_G = a * mass1
a = F_G / mass1
= gamma * mass2 / distance^2
And you'll see that the acceleration is independent of the moving object's mass. What remains is gamma * mass2 which you can set to an arbitrary constant. Whichever meets your needs best.
Now we have the length of the acceleration vector. The direction is of course normalize(cursorPosition - pointPosition). So the overall ac…