cancel
Showing results for 
Search instead for 
Did you mean: 

1:1 rotation using 3DOF controller

Tomires
Level 3
Hello,

I am trying to implement a 1:1 rotation interaction inside my Oculus Go application. The options that I am considering are to either lock the controller in place and rotate it in one spot or hide the controller altogether (the new Breaking Bounderies app uses this approach, but I am worried about UX implications). Which do you feel is more natural, and perhaps more importantly, is there a way to easily disable automatic positioning of the in-app controller object? I am using Unity.

The interaction in question is seen in the latter half of this video:

Thanks for help!
4 REPLIES 4

Tomires
Level 3
Can you clarify what you mean by "disabling automatic positioning of the in-app controller object"? What exactly are you referring to here?

Hello, thanks for the reply.

I am referring to the way how an object using the OVR Tracked Remote script automatically positions itself (based on rotational data from the controller) on the surface of a sphere to simulate arm movements around the elbow. Is there a (non-hacky) way to turn it off? In other words I would like the controller to rotate in pitch and yaw axes in the same way as it does in the roll axis or to put it another way, stay in one position and only change rotation.

jhocking
Level 3

Tomires said:
I am referring to the way how an object using the OVR Tracked Remote script automatically positions itself


Actually that script simply toggles between the Gear VR and Oculus Go controllers, it doesn't position the controller. Go ahead and read the code; it doesn't say anything about position.

I'm guessing you are also using OVRCameraRig, in which case the positioning is happening there (kinda confusing that the controllers are handled in a script named "camera", but oh well). Look for the UpdateAnchors() method, which has calls to both 



OVRInput.GetLocalControllerRotation() and OVRInput.GetLocalControllerPosition().

That obviously means you could accomplish what you want by calling only OVRInput rotation and not position, but this may be easier said than done in your case. Are you a programmer? I simply wrote my own controller handling script and don't use OVRCameraRig, but if you aren't fairly proficient with programming then this isn't an option for you.

I suppose you could just comment out or delete the couple lines referring to controller position. That's kindof a hacksaw approach but doesn't require any programming knowledge...

Tomires
Level 3
Thanks, @imperativity !

jhocking said:

I'm guessing you are also using OVRCameraRig, in which case the
positioning is happening there (kinda confusing that the controllers are
handled in a script named "camera", but oh well).


Thanks for pointing it out! I didn't think to look there. The TrackedRemote script felt a bit light :smile: 
I am trying to avoid modifying OVR SDK's scripts, because I don't feel like putting the entire 150 megs of goodness on version control, but if there is no other option, I will probably just extend the script myself.

jhocking
Level 3
Well you wouldn't need to modify the OVR scripts if you replace them with your own scripts like I did. As in, while I do use scripts like OVRInput and OVRRaycast, I don't use either OVRTrackedController or OVRCameraRig. Instead, I wrote my own script that has the functionality I want copied from the OVR scripts.