How do you pick up and drop items?

Hi!

I would like to know how you could pick up items from the floor and then drop them right in front of you.
When you pick up the item, it appears in your hand.

And how would I make a boolean able to know when I have it in my hand?

  1. Raycast from the center of the screen
  2. If it hits anything, check if the hit object is an item (for example, by checking if the tag is the right one)
  3. Assign this object to a “handItem” gameObject variable so it can be accessed.
  4. parent the item to your character
  5. change it’s transform.position and transform.rotation to wherever you want it (so that it sits at the bottem right corner of the screen, for example).