godot-xr-tools icon indicating copy to clipboard operation
godot-xr-tools copied to clipboard

hand interaction scaling

Open peterclemenko opened this issue 1 year ago • 2 comments

the ability to scale an object with a hand interaction would really help for ux development

peterclemenko avatar Sep 24 '24 12:09 peterclemenko

It should be possible to create a "grab-scaling" script/node that can be attached as a child of an XRToolsPickable node which:

  1. Subscribes to the XRToolsPickable.grabbed and XRToolsPickable.released script
  2. Interrogate the XRToolsPickable._grab_driver to see if its being held by two hands
  3. Scales by the distance between the two hands

If that works then we'd probably want to expose an XRToolsPickable.get_grab_driver() method rather than having the script reach in to the private _grab_driver field.

Malcolmnixon avatar Sep 26 '24 03:09 Malcolmnixon

That sounds ideal.

peterclemenko avatar Sep 26 '24 12:09 peterclemenko