- Home /
Push object out of another
What I want to do is if I drag and release an object on top of another object, it gets pushed out the nearest side. I've tried for a long time to get it to work but every solution I come up with has a lot of problems. Does anyone have any suggestion?
Hi, what exactly are you trying to achieve ? Are you dropping objects onto other objects and they should be pushed away or they should slide inside the object and then be pushed out on 1 of the sides of the object ?
It would also help if you would mention what you have already tried, btw :)
Your answer
![](https://koobas.hobune.stream/wayback/20220613001510im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Adding and removing specific components to a list based OnTriggerEnter/Exit, Getting Null Exceptions 1 Answer
Can I make mass and density constant independent of Collider 2D size? 1 Answer
Multiple EdgeCollider2D lags so much on mobile 0 Answers
void OnTriggerEnter2D(Collider2D other) ..... What is is "other" called as ??? 2 Answers
Why can't I drag text into public text in the inspector when instantiated? 1 Answer