Forum Discussion
bebop_dev
6 years agoProtege
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
- bebop_devProtegeI 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.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 12 days ago