BodyController API

The NUI Service tracks the human bodies inhabiting the room that can interact with Xbox One. The BodyController API integrates into the User Manager to provide the system and apps with awareness of these bodies and their associations with users and other forms of input.

Overview

The BodyController API supports the following types of scenario:

The BodyController API provides dedicated functionality for managing human bodies and their associations to users on the system. Rather than having to query for all IControllers and filter out the ones of type “…Nui.Body”, the BodyController class provides means of directly accessing the list of bodies being tracked. Additionally, it provides dedicated events for when bodies are added and removed from the system. Finally, it provides a biometric user identifier, an efficient way to maintain continuity of experiences when users leave and re-enter the field of view.

BodyController::User provides information about which profile a body is acting on behalf of. In many cases, this will be the same user represented by the BiometricUserId property. However, there are common, legitimate reasons why the User object does not always represent the user’s true identity, for example:

For gameplay situations where the game requires a consistent physical identity of the player, the BiometricUserId property should be used. For scenarios where the game simply needs to determine which profile the body controller is bound to, the BodyController.User property should be used.

Flow of Control

When a human body begins to be tracked by Kinect, it is represented as a BodyController. Its Id property corresponds to the Body.TrackingId property in the KinectSensor API. Its User property is null. Its BiometricUserId property is 0.

The system automatically starts trying to biometrically recognize the body. Once recognized, its BiometricUserId property gets set to a unique identifier of the recognized user on the console. The BiometricUserId property corresponds to the User.Id property of the identified user.

If that user then engages through gesture (holding their hand toward the sensor), voice (saying “Xbox”), or gamepad (picking up a gamepad), then they will be biometrically signed in, causing a User object to be added. Their BodyController’s User property will then be set to that User object. Once signed in, if that body stops and then starts being tracked again, when it’s subsequently recognized, its BiometricUserId will be set again, and its User property will be set to the recognized signed in user.

BodyController Properties

BodyController Class (defined in the Windows.Xbox.Input namespace) is a type of IController and contains the standard set of public properties:

Additionally, BodyController contains an additional public property unique to this type:

BodyController Events

BodyController contains the following public events:

BodyController Methods

BodyController contains the following public method: