diff --git a/fallback/windows-nui/src/sensor.cpp b/fallback/windows-nui/src/sensor.cpp index 28f941a..82176fc 100644 --- a/fallback/windows-nui/src/sensor.cpp +++ b/fallback/windows-nui/src/sensor.cpp @@ -571,6 +571,13 @@ void VirtualKinectSensor::BuildSkeletonFrame(const SourceFrame& src) { frame.liTimeStamp = ts; frame.dwFrameNumber = src.meta.frame_number; frame.dwFlags = 0; + // A real Kinect always reports the floor plane (Hessian form Ax+By+Cz+D=0, + // unit up-normal, D = -sensor-height) and the up gravity normal. The game + // builds a floor/gravity-relative transform from these and validates each + // skeleton's center of mass against it; leaving them zero makes that + // transform degenerate so no skeleton is ever a selectable candidate. + frame.vFloorClipPlane = {0.0f, 1.0f, 0.0f, -1.5f}; + frame.vNormalToGravity = {0.0f, 1.0f, 0.0f, 0.0f}; for (auto& data : frame.SkeletonData) { data.eTrackingState = NUI_SKELETON_NOT_TRACKED;