What event fires when a player is not detected by Kinect in unity

* I worked on a project in 3D unity using the kinect setting. The setup works fine. I use Unity3D 3.4 in combination with OpenNI, C # coding and, of course, kinect.

The problem I am facing is that the standard openNI player is not sufficient, as it does not recognize the player leaving first without a timeout. The fact is that I'm trying to figure out which event is triggered at the moment when the player is hidden from view.

Usually, when a player leaves the frame, the program starts the countdown, and only after (in my case) 20-30 seconds will he release the actual player.

In short, I need to know what event is triggered when the player is no longer visible. Or I would like to decide how to find out at any moment how many active players are in sight.

Thank you in advance! *

Decision:

private void ExitUserCallback(object sender, UserExitEventArgs e) { // Put whatever code you want active when player leaves field of view Debug.Log("Exit user, userID=" + e.ID); } 
+4
source share
1 answer

The answer, as written in the main question:

 private void ExitUserCallback(object sender, UserExitEventArgs e) { // Put whatever code you want active when player leaves field of view Debug.Log("Exit user, userID=" + e.ID); } 

Thanks for the help;)

0
source

Source: https://habr.com/ru/post/1441083/


All Articles