godot-wyvernbox-inventory
godot-wyvernbox-inventory copied to clipboard
Add overlap-check for `GroundItemStackView3D`
2D items have this, 3D items do not. But rather than adding overlap-checking as a GroundItemStackView3D
feature, I'd rather make it a separate system, to make it centralized and allow more optimizations.
A GroundItemHUD
will let a GroundItemManager
register and unregister items to display. The HUD will handle input, label positioning and clicking, non-overlap, frustum culling etc. When the connected camera moves, label positions are updated - simply offset for 2D and moved with self-implemented collision-checking for 3D.
What this also means:
- as mentioned, allows more performance optimizations;
- it's easier to customize how the label looks - perhaps a system similar to how tooltips are customized, just slap a few scripts?
- you could just not add the HUD node to the scene if you don't need the labels! After all, not all games with inventories have them.