- Home /
how to make Items get close to character like magnet?
Hi, im working in some scripts that when an objetc or item came closer to the character the item go to that position, like if the character just absorb it like an magnet. So the question is, how can i get the position of the player? is this script must be in the item or in the char? and can i give some radius to the item like a limit to be absord? thanks
Answer by delstrega · Jul 10, 2012 at 06:58 PM
You can achieve that magnet effect by using an inverse explosion force like shown here:
http://answers.unity3d.com/questions/20544/magnet-code-from-c-to-javascript-can-i-make-it-aff.html
Your answer
![](https://koobas.hobune.stream/wayback/20220613074005im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
zoom problem with GUI Box that follows a character 1 Answer
How Move Player between Scenes? 7 Answers
Making character items and customizable characters? 1 Answer
switch character 1 Answer
Character Position error 0 Answers