The typical way of setting up a MotionController in Unreal Engine is through Blueprints, but I'm trying to identify different types of motion controllers for various VR setups and from there apply the orientation and position data. I have no problems getting Oculus Rift and Vive controllers and trackers using C++, but on Oculus Quest the array that's populated with IMotionControllers is empty when debugging over ADB. Why might this be?
The following code will print a length of 0 on Oculus Quest only.
const FName feature = FName(TEXT("MotionController")); TArray<IMotionController*> controllers = IModularFeatures::Get().GetModularFeatureImplementations<IMotionController>(feature); UE_LOG(LogGloveController, Warning, TEXT("Number of Controllers: %d"), controllers.Num());