These two scripts, HandDraggable.cs and GestureAction.cs, seem to do very similar things. The MR Academy implements the GestureAction script. What is the difference between these 2 scripts and when would you use one or the other?
Asked
Active
Viewed 169 times
2
-
Do you have code samples of these scripts? Hard to determine the difference if we don't have the code. – Remy Nov 08 '18 at 14:47
-
@remy_rm The scripts are part of the Holotoolkit. If you aren't familiar with the scripts and haven't used them in practice I think it would be hard to compare/contrast them and when you would use one over the other. – slaphshot33324 Nov 08 '18 at 14:49
-
Glancing over the 2 scripts, `HandDraggable.cs` is a ready-made component whose task is solely for translation an object in the 3D space. Whereas `GestureAction.cs` is a component created for the purposes of a tutorial and is not actually a part of the HoloToolkit package. It defines a custom action - which could be rotation, scale, translation, etc. They are similar because `GestureAction.cs` uses the using `HoloToolkit.Unity.InputModule` namespace, of which `HandDraggable.cs` is a member, and the tasks they accomplish are both started with a manipulation event. – Enfyve Nov 11 '18 at 00:22
-
Hi, and thank you for the reply. Let me validate this today and let you know so you can post an answer and get the bounty. – slaphshot33324 Nov 12 '18 at 15:09
-
@Enfyve Please turn your comment into an answer and I'll mark it correct and give you the bounty. – slaphshot33324 Nov 13 '18 at 19:58
1 Answers
1
HandDraggable.cs
is a ready-made component whose task is solely for translation an object in the 3D space.
GestureAction.cs
is a component created for the purposes of a tutorial and is not actually a part of the HoloToolkit package.
It defines a custom action - which could be rotation, scale, translation, etc. They are similar because GestureAction.cs
uses the using HoloToolkit.Unity.InputModule
namespace, of which HandDraggable.cs
is a member, and the tasks they accomplish are both started with a manipulation event.

Enfyve
- 916
- 10
- 22