# XRBodyTrackingFeature

This `OpenXRInteractionFeature` configures Android XR extensions `XR_ANDROIDX_body_tracking` at runtime and provides `XRHumanBodySubsystem` implementation that works on Android XR platform.

Note: due to the dependency on [XRSessionFeature](https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/XRSessionFeature#classGoogle_1_1XR_1_1Extensions_1_1XRSessionFeature), its priority must be lower than the features so the feature registration happens after `XrInstanceManager` creation.

## Summary

### Inheritance

Inherits from: `OpenXRFeature`

| ### Public attributes ||
|---|---|
| [ExtensionString](https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/XRBodyTrackingFeature#extensionstring)` = "XR_ANDROIDX_body_tracking"` | `const string` The OpenXR Extension string. |
| [FeatureId](https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/XRBodyTrackingFeature#featureid)` = "com.google.xr.extensions.body_tracking"` | `const string` The feature ID string. |
| [UiName](https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/XRBodyTrackingFeature#uiname)` = "Android XR (Extensions): Human Body (Experimental*)"` | `const string` The UI name shows on the XR Plug-in Management panel, help users to understand validation errors and expected fixes. |

| ### Public static attributes ||
|---|---|
| [IsExtensionEnabled](https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/XRBodyTrackingFeature#isextensionenabled)` => _extensionEnabled` | `bool` Gets if the required OpenXR extension is enabled. |
| [RequiredPermission](https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/XRBodyTrackingFeature#requiredpermission)` = AndroidXRPermission.BodyTracking` | `readonly `[AndroidXRPermission](https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#androidxrpermission) Runtime permission required to enable body tracking. |

| ### Properties ||
|---|---|
| [AutoCalibration](https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/XRBodyTrackingFeature#autocalibration) | `bool` Gets or sets a value indicating whether to use automatic calibration at runtime. |
| [HumanBodyProportions](https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/XRBodyTrackingFeature#humanbodyproportions) | [XRHumanBodyProportions](https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/XRHumanBodyProportions#classGoogle_1_1XR_1_1Extensions_1_1XRHumanBodyProportions) Gets or sets the [XRHumanBodyProportions](https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/XRHumanBodyProportions#classGoogle_1_1XR_1_1Extensions_1_1XRHumanBodyProportions) for rest pose skeleton computation. |

## Public attributes

### ExtensionString

```c#
const string ExtensionString = "XR_ANDROIDX_body_tracking"
```  
The OpenXR Extension string.

Used to check if this extensions is available or enabled.  

### FeatureId

```c#
const string FeatureId = "com.google.xr.extensions.body_tracking"
```  
The feature ID string.  

### UiName

```c#
const string UiName = "Android XR (Extensions): Human Body (Experimental*)"
```  
The UI name shows on the XR Plug-in Management panel, help users to understand validation errors and expected fixes.

## Public static attributes

### IsExtensionEnabled

```c#
bool IsExtensionEnabled => _extensionEnabled
```  
Gets if the required OpenXR extension is enabled.

When OpenXR runtime is waiting, it returns `null`. Otherwise, it indicates whether the XR_ANDROIDX_body_tracking extension is available on current device.  

### RequiredPermission

```c#
readonly AndroidXRPermission RequiredPermission =
            AndroidXRPermission.BodyTracking
```  
Runtime permission required to enable body tracking.

## Properties

### AutoCalibration

```c#
bool AutoCalibration
```  
Gets or sets a value indicating whether to use automatic calibration at runtime.

When automatic calibration is disabled, [HumanBodyProportions](https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/XRBodyTrackingFeature#humanbodyproportions) will take effect.  

### HumanBodyProportions

```c#
XRHumanBodyProportions HumanBodyProportions
```  
Gets or sets the [XRHumanBodyProportions](https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/XRHumanBodyProportions#classGoogle_1_1XR_1_1Extensions_1_1XRHumanBodyProportions) for rest pose skeleton computation.

It only takes effect when [AutoCalibration](https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/XRBodyTrackingFeature#autocalibration) is disabled.