mirror of
https://github.com/hanetzer/sdraw_mods_cvr.git
synced 2025-09-05 11:29:23 +00:00
Stuck device detection
This commit is contained in:
parent
2a7e796862
commit
f6d16f25b7
3 changed files with 13 additions and 13 deletions
|
@ -12,6 +12,7 @@ namespace ml_lme_cvr
|
|||
static LeapMotionExtension ms_instance = null;
|
||||
|
||||
Leap.Controller m_leapController = null;
|
||||
long m_lastFrameId = 0;
|
||||
GestureMatcher.GesturesData m_gesturesData = null;
|
||||
|
||||
GameObject m_leapTrackingRoot = null;
|
||||
|
@ -102,11 +103,15 @@ namespace ml_lme_cvr
|
|||
{
|
||||
if(Settings.Enabled && (m_leapController != null))
|
||||
{
|
||||
Leap.Frame l_frame = m_leapController.Frame();
|
||||
if(l_frame != null)
|
||||
{
|
||||
GestureMatcher.GetGestures(l_frame, ref m_gesturesData);
|
||||
for(int i = 0; i < GestureMatcher.GesturesData.ms_handsCount; i++)
|
||||
m_gesturesData.m_handsPresenses[i] = false;
|
||||
|
||||
Leap.Frame l_frame = m_leapController.Frame();
|
||||
if((l_frame != null) && (m_lastFrameId != l_frame.Id))
|
||||
{
|
||||
m_lastFrameId = l_frame.Id;
|
||||
|
||||
GestureMatcher.GetGestures(l_frame, ref m_gesturesData);
|
||||
for(int i = 0; i < GestureMatcher.GesturesData.ms_handsCount; i++)
|
||||
{
|
||||
if((m_leapHands[i] != null) && m_gesturesData.m_handsPresenses[i])
|
||||
|
@ -119,11 +124,6 @@ namespace ml_lme_cvr
|
|||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for(int i = 0; i < GestureMatcher.GesturesData.ms_handsCount; i++)
|
||||
m_gesturesData.m_handsPresenses[i] = false;
|
||||
}
|
||||
|
||||
if(m_leapTracked != null)
|
||||
m_leapTracked.UpdateTracking(m_gesturesData);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue