How to get an object to attach to another object?
My friend would like to know how to make two rather similar functions for two different games, and she would appreciate your insights.
1. How to make a falling object to attach to another object, so that it wouldn't detach from it after that?
2. There would be an object that would be controlled by mouse. When it would overlap another object, it would attach to it so that it wouldn't detach from it after that.
My friend would like to know how to make those functions. Thank you for your answers!