I am trying to use the mouse to move objects in the editor. When a collision occurs, if the user continues to move the mouse a certain distance X towards the collided object, the main object will jump on top of the collided object (similar to the attached video). What is the best approach to detect this user behavior? I have considered keywords like Raycaster and Collision vector, but I have not been able to implement it yet.
Anyone have idea for this section?
Thank you~