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());764Views0likes1Comment- 442Views0likes0Comments
Detecting which controllers are plugged in
I'm currently working on detecting plugged in controllers for Oculus Rift and also for Oculus GO. Here is function that I've come up with: (it's added to the OculusInput.cpp) FString FOculusInput::GetPluggedControllerName() { FString ControllerType = "None"; ovrpControllerState4 OvrpControllerState; if (OVRP_SUCCESS(ovrp_GetControllerState4(ovrpController_Active, &OvrpControllerState))) { switch (OvrpControllerState.ConnectedControllerTypes) { case ovrpController_Touch: ControllerType = "Oculus_touch"; break; case ovrpController_Gamepad: ControllerType = "Gamepad"; break; default: ControllerType = "Default"; GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Red, FString::FromInt(OvrpControllerState.ConnectedControllerTypes)); break; } } return ControllerType; } It works well when i have only one of them plugged in, it will never work if i have both touch and gamepad plugged in my pc. My queston is if it's there any way to split that? Do i have to just check those hexadecimal values before? Also how can i detect if it's Oculus GO controller?686Views0likes1CommentUnity3D GearVR Controller Not Recentering
I'm trying to recenter the GearVR motion controller via code in my Unity3D game. I've tried called to OVRInput.RecenterController(), OVRInput.RecenterController(OVRInput.Controller.All), and InputTracking.Recenter(). None of these have worked, is this functionality broken, or is there something else I need to do besides calling the recenter function? EDIT: After debugging the OVRPlugin class, everything seems to be returning that re-centering was successful. It's logging 4 controllers connected (which is odd, because the only controller connected is the Motion controller), each controller is registering as needing to be re-centered, and OVRPlugin.RecenterTrackingOrigin(OVRPlugin.RecenterFlags.Controllers) is returning true. It seems like Oculus thinks everything is re-centering correctly, but the controller is still facing the wrong direction. Pressing the Home button re-centers the controller properly, but I'm looking for a way to do this from code for a large-scale ride. EDIT 2: Using verbose logging with ADB, I'm seeing the following error message whenever I call OVRInput.RecenterController() VrApi_Input: vrapi_RecenterInputPose: has been DEPRECATED Does this mean this is an issue with OVRInput? I'd be surprised to hear this has gone unnoticed so far, I imagine many people would want to recenter GearVR controllers.2.3KViews0likes8CommentsShould my Samsung Gear VR Motion Controller be working already?
My Samsung Gear VR Motion Enabled Controller arrived yesterday, THANK YOU SAMSUNG AND OCULUS! My two modest VR Startups: @SchoolHomeVR & @NextWorldVR will make great and unexpectedly creative use of this powerful tool in disguise. My question: Do I have access to the Motion Controller SDK (The SDK available to Oculus Gear VR Developers online)? I do see a scene called 'GearVRControllerTest.unity' and when I compile and build it, it shows in my Gear VR, a seemingly 'live' list of all the Controller devices controls, but DOES NOT update when I press a button, translate or turn the controller,... Please Help! I am ready to incorporate the Controller to 3 Apps which are nearly ready for upload! I have it paired in the Oculus App, and it saw it right away, BUT I did notice, in the Oculus app under the 'More' menu, the CONTROLLERS Section says 'Coming Soon' underneath the word 'Controllers', that gives me some hope that an update (any minute! :) might suddenly 'enable' my precious gift of a Gear VR Motion enabled Controller! ... THANK YOU ! Robert England @SchoolHomeVR @NextWorldVR1.4KViews0likes5CommentsLocal Velocity Motion Controller.
Hi, i have a question about tracking and velocity of motion. In particular i note that when i use motion controller "under the desk" (out of tracking area), the motion controller is properly track but its velocity is 0. This value is greater than 0 only when i use motion in tracking area. To obtain velocity I use the method GetLocalControllerVelocity(). Why this behaviour?1.3KViews0likes1Comment