Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
bebop_dev's avatar
bebop_dev
Protege
6 years ago

Empty Array of IMotionControllers for Unreal using Oculus Quest

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());

1 Reply

  • I checked the array in the TickComponent update and it was populated. There's just a delay sometimes for controller to become available (even with Rift/Vive), but it always happens on Quest.