question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Proposal: Stackable objects of same type in the same SnapDropZone

See original GitHub issue

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

capture

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.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
bddckrcommented, Feb 8, 2018

@moscartong It has merge conflicts and wasn’t updated yet to do the requested changes. You can see that on the PR page.

1reaction
noorbeastcommented, Oct 10, 2017

Moscartong has the inventory basics here: https://github.com/moscartong/VR-Inventory

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues · ExtendRealityLtd/VRTK
Proposal : Stackable objects of same type in the same SnapDropZone enhancement. #1503 opened on Sep 13, 2017 by bkensey.
Read more >
Snap Drop Zone
If the. Use Joint Snap Type is selected then a custom Joint component is required to be added to the SnapDropZone Game Object...
Read more >
Catalog | Bushnell | 2017 | Optics Trade | PDF
Similar to Catalog | Bushnell | 2017 | Optics Trade ... Types of Lens Coatings Coated: A single layer on at least one...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found