Inventory System / Polymorphism

I use a ray trace to detect objects that the player looks at, it is more accurate than a collisions box around the object. Plus when I look at it I can change the icon to a pickup hand which adds a nice touch to it like in the game Far cry 3. Also you will notice that arrays of stucts can be somewhat of an issue if you get complex with it.

I used this tutorial and expanded on it greatly, now my inventory system is legit haha…