you can interpolate from the current position to the next place and limit it if it is in the corner or you can simply define the next position but it depends on how you want to do it, you can make a temporary movement, for example making the object have an opacity smaller and needs a confirmation to determine the movement