- Home /
How do make an object follow my mouse in a game, and make it attach?
Hello, So I am trying to make a script where if I click on a object (weapon, defense, etc.) I can drag it to my player and once it comes in contact with my player it will attach to any part of the body the mouse was over (ex. if the mouse and object is over the leg the weapon attaches to the leg). I already have the objects and weapons to attach to the player as well as the animations. I have tried using the scripts that unity give you for an object to follow a mouse but it doesn't work. I have tried to make an object attach to the player but I can't seem to make the two meshes join. Any suggestions. Thank you.
I have tried to make an object attach to the player but I can't seem to make the two meshes join
What have you tried ?
Your answer
![](https://koobas.hobune.stream/wayback/20220613193328im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
RigidBody Collision Detection 1 Answer
Launched arrow sticks to target rigidbody...but causes target to spin, slide, and vibrate? 1 Answer
RigidBody2D pushed away on opposite direction 3 Answers
Cancel the torque resulting from a collision (found whats wrong, don't know how to fix it) 0 Answers
Making a Gameobject expand! 1 Answer