KinectManager.IsUserDetected C# (CSharp) Method

IsUserDetected() public method

public IsUserDetected ( ) : bool
return bool
    public bool IsUserDetected()
    {
        return OpenNIInitialized && (allUsers.Count > 0);
    }

Usage Example

Example #1
0
    private void Update()
    {
        KinectManager manager = KinectManager.Instance;

        if (!manager || !manager.IsInitialized() || !manager.IsUserDetected())
        {
            return;
        }

        int iJointIndex = (int)TrackedJoint;


        if (manager.IsUserDetected())
        {
            uint userId = manager.GetPlayer1ID();

            if (manager.IsJointTracked(userId, iJointIndex))
            {
                Vector3 posJoint = manager.GetRawSkeletonJointPos(userId, iJointIndex);
                if (posJoint != Vector3.zero)
                {
                    if (posJoint.x <= rangMax && posJoint.x >= rangMin)
                    {
                        SceneManager.LoadScene("Interaccio");
                    }
                }
            }
        }
    }
All Usage Examples Of KinectManager::IsUserDetected