Get Lean Amount

Description:

This function returns the amount that the supplied body is leaning from the vertical position as a Vector2. The X and Y values corresponding to leaning left/right and forward/backward respectively. These values can be leveraged to build a 'human as joystick' style input system. The range of values returned are -1 to 1 for each direction. This represents the percentage towards the limit 45 degrees in each direction. Leaning at an angle greater than the limit will return a value clamped to 1.

Inputs:

  • Target [KinectInterfaceComponent]: The Unreal Engine/Kinect interface object.
  • Body Number [EBodyNumber]: The body whose lean values are being retrieved from the Kinect device.

Outputs:

  • Return Value [Vector2]: The amount that the target body is currently leaning in forward/backward and sideways directions. The values returned range from -1 to 1 for each field in the vector.