I’m creating a simple inventory system for a first-person horror game. It may sound a little silly, but my problem is this. I tried to make an inventory according to this tutorial: https://youtu.be/V79YabQZC1s?si=yt8gp6-B8pevoduB, but then I realized that this is not exactly what I need, since there 2D textures are used as objects, and for interactible objects, I want to use 3D models. But I did not fully understand how to do this. I tried to watch other tutorials, but after a couple of days I didn’t achieve the desired result and ended up getting confused.
At this point, I know that for interactable items, i can use enumeration (enum).
But I don’t understand how to connect this to the inventory so that the items are displayed there and can be interacted with. Pls help
can you elaborate on what the problem is with your inventory system? it sounds like you have 2d sprites in your ui, but you want to have 3d models instead? or maybe the items that spawn in the 3d environment are wrong? what is the current state of your game and what do you want instead?
Hi. I apologize for such a delay in answering your question. Nah, not really. As I said, when creating the inventory system, I relied on the above-mentioned video. With it, I planned to create the same thing, but the pickup items were supposed to be 3D objects, not 2D sprites. Once I got to the point where I created the item pickup script (timecode 50:59), I realized that I was doing something completely different from what I needed.
A few days later I found this tutorial: https://youtu.be/XLjCmdy8jdw?si=P0uuhWi2ncCTjzmK, it already explains how to make the inventory system that suits me. But I encountered another problem in it. There is another method of interaction with objects, because the project uses a character with a third person view without RayCast3D. The description below this tutorial included a link to the GitHub project. I downloaded it and tried to implement my player script with RayCast, but so far it hasn’t yielded any results.
In general the objects you interact with should be independent of the objects in your inventory.
The objects in your world are made for… interacting and being visually appealing.
In your inventory there is most likely a different kind of representation that fits your requirements there.
So you interact with different object in your environment than in your inventory