lemankk / as3openni

Automatically exported from code.google.com/p/as3openni
0 stars 0 forks source link

Random user can pass through the kinect area while it is in use and will stop everything on LOST #12

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I need major help!!! I am designing a game that will be at a tradeshow which 
means lots of people walking by. The problem it seems is that once kinect sees 
you "New user" even if you are just strolling by it seems to kill or mess up 
the ONISkeletonEvent.USER_TRACKING data.

Please if you have any ideas I need them fast! This thing needs to ship end of 
week.  I thought I could handle this by assigning an activeUserID and filtering 
based on that but it just doesn't care. When it "LOST USER" it is game over 
even if that was just someone watching and then moving away.

PLEASE HELP!!!  

Original issue reported on code.google.com by jbla...@gmail.com on 21 Sep 2011 at 11:24

GoogleCodeExporter commented 8 years ago
You can update the MaxDepthValue inside the
GlobalDefaults.ini, it's measured in meters. By default it's set to
10000, so you can change that to a less amount perhaps.

On a PC it's located here: c:\Program Files\Prime Sense\Sensor\Data
\GlobalDefaults.ini
On a Mac here: /usr/etc/primesense/GlobalDefaults.ini 

Original comment by mosaic...@gmail.com on 22 Sep 2011 at 2:37

GoogleCodeExporter commented 8 years ago
If not mistaken, I'm also facing this issue. Seems that the user skeleton 
tracking gets messed up when there's few people around. It happens all the 
time. Similarly, i tried tracking the "User ID" and filter based on that, but 
it can't solve the problem.

How do I ensure the "User ID" tracking doesn't get messed up?

Original comment by clement...@gmail.com on 26 Sep 2011 at 4:03

GoogleCodeExporter commented 8 years ago
I have found that the new/lost user events and the user ID are unreliable.  Old 
skeleton data gets stuck/stalled when a user walks off screen. Trace out one 
point like the torso and you will see that you are getting conflicting data 
from the stalled user that left plus the current user. So 30 times a sec you 
are getting both good and bad/stalled data that will make your controls feel 
locked. You have to filter out the old/stalled data. I recommend looking at one 
point and storing they last 20 or values then count those values and if the 
count is > 2 then it is stalled so add it to an ignore list in your skeleton 
listener. I also defined a box that I called the active zone.  So I only use 
the skeleton data if they are not stalled and if they are in the active zone. 
When they leave the zone I start an on screen count down to give them 5 secs to 
return before I restart the game. I have also added a shutdown to as3openni and 
then init it again which does clear the stalled data.

Original comment by jbla...@gmail.com on 26 Sep 2011 at 9:55

GoogleCodeExporter commented 8 years ago
Do you mind sharing the code for filtering out the old/stalled data? 
Specifically this part "the count is > 2". I didn't really get it but will 
definitely try it out.

It seems that when in a controlled environment (1 person), it's much  more 
stable, but it also happens sometimes. And how did you add a shutdown/restart 
to as3openni without closing the app? I'll greatly appreciate your help and 
input. 

Original comment by clement...@southpaw.com.my on 26 Sep 2011 at 10:40