Hi!
I am been working, trying out and figure out how to make and create a script within my player model on how to pick up and drop items. And with the testings that I have done, it have now worked. Even made so the animation works as well when grabbing and holding the items.
But as I now started to wanna experiment and try out, is it possible that(for example: ) When I press E, depends on which item I am looking at to press E on, will be picked up. But because there will be(another example) 60 different models/objects that I want to be able to pick up. I want so that each object(which will have their own animation connected to it) will work.
On the picture that I will show, I have been using a Knife model to just work and understand the idea how the script for picking items up works:
Also some context, I have made so when I press E on the knife, a script on the knife will start. By deleting the actor from the level. So it will then appear in my hand. And I use a Enumeration for it(which is also connected to the animation).
And when I press Q(to just see how it works when wanna drop the item) I spawn the item back in.