This is the first in a long series of videos that has actually worked for me, thank you! Two questions - One, when I move my mouse quickly, the item drops. I assume this is because it registers that the object moves "outside" the mouse area (the "OnMouseExit" line) but is there a way to prevent this, so you could whip your mouse around and still prevent dropping the item? Two, is there a way to make it so you could pick up multiple items at once? The game I'm trying to make requires the ability to grab and carry/throw multiple items at once. I've also just now noticed that apparently, spheres do not like to be held. I can pick up a sphere object, but the sphere doesn't follow character movement, and will remain mostly stationary in the air. It follows the camera, but not the character walking.
Glad it helped! I haven't seen the sphere issue so I will have to look into it to find a fix, but for the item getting dropped when moving the mouse quickly you are right that it is because of the OnMouseExit method. To stop it you'll have to get rid of the method and drop the item a different way, possibly using a raycast
I love you. It was easily implementable into my interaction scripts. Thank you!!!!! I do have the issue that when flicking my mouse the item drops, any fixes????
Glad it helped you! The reason the mouse flicking drops the item is because of the OnMouseExit method being called. Essentially the mouse moves faster than the item can keep up. Simple fix is just to remove the method and handle item dropping a different way
That was very helpfull bro. Thank u
Glad it helped!
Awesome! I was looking for days how to do this and boom! A video on how to do it and updated for unity 6, ty ;)
No problem, happy it helped you!
Right when i needed it! Thanks!!!
Happy it was helpful!
This is the first in a long series of videos that has actually worked for me, thank you!
Two questions -
One, when I move my mouse quickly, the item drops. I assume this is because it registers that the object moves "outside" the mouse area (the "OnMouseExit" line) but is there a way to prevent this, so you could whip your mouse around and still prevent dropping the item?
Two, is there a way to make it so you could pick up multiple items at once? The game I'm trying to make requires the ability to grab and carry/throw multiple items at once.
I've also just now noticed that apparently, spheres do not like to be held. I can pick up a sphere object, but the sphere doesn't follow character movement, and will remain mostly stationary in the air. It follows the camera, but not the character walking.
Glad it helped! I haven't seen the sphere issue so I will have to look into it to find a fix, but for the item getting dropped when moving the mouse quickly you are right that it is because of the OnMouseExit method. To stop it you'll have to get rid of the method and drop the item a different way, possibly using a raycast
This is awesome! Subscribed.
I appreciate it!
could you put the code in the descirption or in the comments
please ?
I love you. It was easily implementable into my interaction scripts. Thank you!!!!! I do have the issue that when flicking my mouse the item drops, any fixes????
Glad it helped you! The reason the mouse flicking drops the item is because of the OnMouseExit method being called. Essentially the mouse moves faster than the item can keep up. Simple fix is just to remove the method and handle item dropping a different way
it says " Temp Parent not found in scene" even though there is a temp parent object attached to my camera in the scene
Be sure that your temp parent has the temp parent singleton script attached
Hasn't worked