Description:
The player can interact with objects using a raycast in the environment to either collect items or openable objects like doors, drawers, and cabinets. Items highlighted will appear when the player is close to an interactive object.
Interaction Types:
Items:
When the player interacts with an item (e.g., keys, notes, lighter fuel), it is added to the inventory.
Items will highlight when looking at them correctly.
Environmental Interactions:
The player can open or close doors, drawers, and cabinets by interacting with them.
Objects will animate to reflect interaction.
Some objects may require specific items (e.g., a key for a locked door).
Interaction System:
When near an interactive object, the items will highlight, pressing E will confirm the pickup.
Interaction logic is context-based:
If the object is collectible, it is added to the Player inventory.
If the object is openable, it opens, closes, or changes state.