-
-
Notifications
You must be signed in to change notification settings - Fork 985
Open
Labels
Description
Overview
I'm proposing the addition of new functionality to VRTK_SnapDropZone to accommodate the stacking of identical VRTK_InteractableObject based items.
This will be useful for me in particular in building an RPG style inventory, but I can imagine it being useful in other contexts too (eg. tracking grenade count in an FPS chest-mounted inventory a la Onward)
Code In Progress
- Made rough working changes to VRTK_SnapDropZone to tally the number of objects being stacked
- Added a (very) rough test to determine whether an interactable object is the same kind already snapped to an SDZ.
- Tweaked VRTK_InteractableObject to add a new "stackable" property
Demo
For discussion
- Is this functionality generalized enough to merit inclusion into VRTK?
- What is the best way to perform interactable object type comparison (tags, subclass comparison, id variables?)
- Should all of the proposed functionality, like the item counter, be added to VRTK_SnapDropZone or should it be added to a subclassed prefab instead?
- What are the implications for communication between SDZs. Users might want to prevent multiple stacks of the same object, meaning that an SDZ would have to check in with each of the other SDZs in its group to see if they should receive the interactable object instead. Perhaps a VRTK_SnapDropZoneGroup component is worth considering.
