I started using this AFrame example to mess around with graphs in VR:
https://github.com/vasturiano/3d-force-graph-vr
I needed to have more control over the scene so I moved to the lower level component:
https://github.com/vasturiano/aframe-forcegraph-component
Everything works nicely but I am now trying to bridge the gap between the lower-level three.js objects that are attached to the forcegraph AFrame entity and the VR controls at the scene level. I would like to add basic manipulation of the graph with VR controllers and/or hands but I am failing to conceptually connect the 2 up. The comments on the repos basically just say "use the lower-level frameworks to do this".
The concrete question: how do I add the ability to drag a node with this component? I know I'll have to write custom code to do it, just unsure actually how and where to do it. I haven't even gotten to a point where I know where to start trying to do this.
In other examples of this, the ability to manipulate the graph is there but only for a mouse and not in VR. I'm fine with hacking it so it only works for VR (specifically the Meta Quest 2), don't need to worry about anything else at the moment. I am using other AFrame level components too so I would like to stay at the AFrame level of abstraction as much as possible.
I am seeking comments on general direction, pseudocode, stubs, etc. I feel like I'm missing something small here to figure this out. I am pretty much a beginner.
Aframe version: 1.3.0
Updated question:
- Ability to move the nodes in the graph using oculus quest 2 controllers
- Ability to twist/turn/scale in/scale out the entire graph using oculus quest 2 controllers