Date | Package File (.unitypackage) | Demo Project |
---|---|---|
06/18/2021 | v2021.2 | v2021.2 (Unity 2020.3.9) |
02/10/2021 | v2021.1 | v2021.1 |
08/19/2020 | v1.3.0 | v1.3.0 |
07/10/2020 | v1.1.0 | v1.1.0 |
06/29/2020 | v1.0.0 | v1.0.0 |
Hand Gesture SDK for Unity provides the following functions:
*This SDK is applicable to both MAD Gaze GLOW and MAD Gaze GLOW Plus model.
The application shall be
GLOW Service app shall be installed on your Android phone. (Check Getting Started)
Tested Unity Editor Versions
Download the Unity Package here.
Double Tap on the downloaded package and import the files.
Download the Android Service application and Install the application on your Android phone.
GLOW Service (Android APK) |
---|
Download here |
You are ready to develop Glow-enabled apps.
MAD Gaze SDK provides different types of Hand Gesture recognition for your application. AR/MR Smartglasses is the next big trend and Hand Gesture Control will allow users to interact with virtual objects in a more direct way.
MAD Gaze Hand Gesture System captures the video with a single camera, and process the recognition with AI technology.
We provide different types of Hand Gesture recognition to enrich the user experience for your application, you can also selectively enable the particular features for better performance.
Hand Signal is suitable for the application with simple-and-direct controls.
OnTracked(HandSignal.Type type, HandSignal.Direction direction, Vector3 pos1, Vector3 pos2)
Parameters
Hand Signal | Feature Point Description |
---|---|
SIGNAL_ONE | The finger tip of Forefinger |
SIGNAL_OK | The intersection point of Forefinger and Thumb |
OnTrackedLost()
Parameters
None
Drag prefab MGHandGesture from MADGaze/Demo/Prefabs into your scene.
Toggle the Hand Signal Control button on Inspector view and set it to ON.
Check Enable on Startup under Hand Signal Control section.
Create a Script file and insert with following code segments.
4.1 Add MADGazeSDK namespaces.
using MADGazeSDK;
4.2 Insert following code segments for the callbacks for Hand Signal Recognition.
void HandSignal_OnTracked(HandSignal.Direction direction, Vector3 pos1, Vector3 pos2) {
}
void HandSignal_OnTrackedLost() {
}
Create an object and add the created script into the object.
Bind the created methods to corresponding callbacks on Inspector view.
Drag prefab MGHandGesture from MADGaze/Demo/Prefabs into your scene.
Toggle the Hand Signal Control button on Inspector view and set it to ON.
Check Enable on Startup under Hand Signal Control section.
Create a Script file and insert with following code segments.
4.1 Add MADGazeSDK namespaces.
using MADGazeSDK;
4.2 Insert following code segments for the callbacks for Hand Signal Recognition.
HandGestureManager.Instance.Controller<HandSignalController>().registerCallback(
(HandSignal.Type gestureType, HandSignal.Direction direction, Vector3 pos1, Vector3 pos2)=>{
//OnTracked
},
()=>{
//Hand Lost
}
);
Create an object and add the created script into the object.
You can check HandGestureDemo in MADGaze/Demo/Scenes.
Hand Cursor 2 allows you to interact with actual environment. User will be able to control a cursor with familiar gesture such as drags and clicks.
OnTracked(HandCursor2.Direction direction, Vector3 pos1)
Parameters
OnClicked(HandCursor2.Direction direction, Vector3 pos1)
Parameters
OnMoved(HandCursor2.Direction direction, Vector3 pos1, Vector3 pos2)
Parameters
OnDragStarted(HandCursor2.Direction direction, Vector3 pos1)
Parameters
OnDragging(HandCursor2.Direction direction, Vector3 pos1, Vector3 pos2)
Parameters
OnDragEnded(HandCursor2.Direction direction, Vector3 pos1)
Parameters
OnTrackedLost()
Parameters
None
Drag prefab MGHandGesture from MADGaze/Demo/Prefabs into your scene.
Toggle the Hand Cursor 2 Control button on Inspector view and set it to ON.
Check Enable on Startup under Hand Cursor 2 Control section.
Create a Script file and insert with following code segments.
4.1 Add MADGazeSDK namespaces.
using MADGazeSDK;
4.2 Insert following code segments for the callbacks for Hand Cursor 2 Recognition.
void HandCursor2_OnTracked(HandCursor2.Direction direction, Vector3 pos1) {
}
void HandCursor2_OnClicked(HandCursor2.Direction direction, Vector3 pos1) {
}
void HandCursor2_OnMoved(HandCursor2.Direction direction, Vector3 pos1, Vector3 pos2) {
}
void HandCursor2_OnDragStarted(HandCursor2.Direction direction, Vector3 pos1) {
}
void HandCursor2_OnDragging(HandCursor2.Direction direction, Vector3 pos1, Vector3 pos2) {
}
void HandCursor2_OnDragEnded(HandCursor2.Direction direction, Vector3 pos1) {
}
void HandCursor2_OnTrackedLost() {
}
Create an object and add the created script into the object.
Bind the created methods to corresponding callbacks on Inspector view.
Drag prefab MGHandGesture from MADGaze/Demo/Prefabs into your scene.
Toggle the Hand Cursor 2 Control button on Inspector view and set it to ON.
Check Enable on Startup under Hand Cursor 2 Control section.
Create a Script file and insert with following code segments.
4.1 Add MADGazeSDK namespaces.
using MADGazeSDK;
4.2 Insert following code segments for the callbacks for Hand Cursor 2 Recognition.
HandGestureManager.Instance.Controller<HandCursor2Controller>().registerCallback(
(HandCursor2.Direction direction, Vector3 pos1)=>{
//OnTracked
},
(HandCursor2.Direction direction, Vector3 pos1, Vector3 pos2)=>{
//OnMoved
},
(HandCursor2.Direction direction, Vector3 pos1, Vector3 pos2)=>{
//Clicked
},
()=>{
//Hand Lost
}
)
Create an object and add the created script into the object.
You can check HandGestureDemo in MADGaze/Demo/Scenes.
Hand Grab allows you to interact with actual environment. User will be able to perform picking up an object and placing it in to specific location.
OnStarted(HandGrab.Direction direction, Vector3 pos1)
Parameters
OnMoved(HandGrab.Direction direction, Vector3 pos1, Vector3 pos2)
Parameters
OnEnded(HandGrab.Direction direction, Vector3 pos1)
Parameters
OnCancelled()
Parameters
None
Drag prefab MGHandGesture from MADGaze/Demo/Prefabs into your scene.
Toggle the Hand Grab Control button on Inspector view and set it to ON.
Check Enable on Startup under Hand Grab Control section.
Create a Script file and insert with following code segments.
4.1 Add MADGazeSDK namespaces.
using MADGazeSDK;
4.2 Insert following code segments for the callbacks for Hand Grab Recognition.
void HandGrab_OnStarted(HandGrab.Direction direction, Vector3 pos1) {
}
void HandGrab_OnMoved(HandGrab.Direction direction, Vector3 pos1, Vector3 pos2) {
}
void HandGrab_OnEnded(HandGrab.Direction direction, Vector3 pos1) {
}
void HandGrab_OnCancelled() {
}
Create an object and add the created script into the object.
Bind the created methods to corresponding callbacks on Inspector view.
Drag prefab MGHandGesture from MADGaze/Demo/Prefabs into your scene.
Toggle the Hand Grab Control button on Inspector view and set it to ON.
Check Enable on Startup under Hand Grab Control section.
Create a Script file and insert with following code segments.
4.1 Add MADGazeSDK namespaces.
using MADGazeSDK;
4.2 Insert following code segments for the callbacks for Hand Grab Recognition.
HandGestureManager.Instance.Controller<HandGrabController>().registerCallback(
(HandGrab.Direction direction, Vector3 pos1)=>{
//onStarted
},
(HandGrab.Direction direction, Vector3 pos1, Vector3 pos2)=>{
//onMoved
},
(HandGrab.Direction direction, Vector3 pos1)=>{
//onEnded
},
()=>{
//onCancelled
}
)
Create an object and add the created script into the object.
You can check HandGestureDemo in MADGaze/Demo/Scenes.
Hand Tracking will track your hands and provide the position of all feature points.
OnTracking(TrackedHand h1, TrackedHand h2)
Parameters
TrackedHand | |
---|---|
degree | determine the angle of the 2 intersecting lines between Point A and Point B |
direction | determines whether the tracked hand is a Left Hand or a Right Hand |
getPosition(FeaturePointType) | obtains the position in Screen Space Position of particular feature point |
isBackHand | determine whether the tracked hand is at its palm-side or dorsal-side |
The degree is defined as the angle of the two intersecting lines between Point A (Bottom of the wrist) and Point B (Bottom of the middle finger joint). A fixed horizon line will be sitting at Point A regardless of its movement, degree is mainly contributed by the amount of turn of the vertical line that sits at point B. This rule applies to both palm-side and dorsal-side of hand.
FeaturePointType | |
---|---|
THUMB_FINGER_TIP | indicates the position of Thumb Tip in Screen Space Position |
FORE_FINGER_TIP | indicates the position of Forefinger in Screen Space Position |
MIDDLE_FINGER_TIP | indicates the position of Middlefinger in Screen Space Position |
RING_FINGER_TIP | indicates the position of Ring Finger in Screen Space Position |
LITTLE_FINGER_TIP | indicates the position of Little Finger in Screen Space Position |
PALM_CENTER | indicates the position of Plam in Screen Space Position |
Drag prefab MGHandGesture from MADGaze/Demo/Prefabs into your scene.
Toggle the Hand Tracking Control button on Inspector view and set it to ON.
Check Enable on Startup under Hand Tracking Control section.
Create a Script file and insert with following code segments.
4.1 Add MADGazeSDK namespaces.
using MADGazeSDK;
4.2 Insert following code segments for the callbacks for Hand Tracking Recognition.
void HandTracking_OnTracking(TrackedHand h1, TrackedHand h2) {
}
Create an object and add the created script into the object.
Bind the created methods to corresponding callbacks on Inspector view.
Drag prefab MGHandGesture from MADGaze/Demo/Prefabs into your scene.
Toggle the Hand Tracking Control button on Inspector view and set it to ON.
Check Enable on Startup under Hand Tracking Control section.
Create a Script file and insert with following code segments.
4.1 Add MADGazeSDK namespaces.
using MADGazeSDK;
4.2 Insert following code segments for the callbacks for Hand Tracking Recognition.
HandGestureManager.Instance.Controller<HandTrackingController>().registerCallback((TrackedHand h1, TrackedHand h2)=>{
});
Create an object and add the created script into the object.
You can check HandGestureDemo in MADGaze/Demo/Scenes.
Q: Why "BindService error: Device not support Hand Gesture" is shown?
You need to install MAD Gaze GLOW Service here first. It the problem persists, open MAD Gaze Service app and try again.
Q: Why the permission dialog never prompt on my Android 10 device?
It is because the native bug doesn't allow you to prompt the permission dialog on Android Q devices with Target SDK newer than 28. You have to set Target SDK at 27 or below in order to make it work.
This library is licensed under the MAD Gaze - Terms of Use.