Forum Discussion
rsanfeliu
11 years agoHonored Guest
Intercept XBox controller induced rotation only?
Hi! Noob question. I want my camera to get the same "feel" as it does natively with an XBox Controller (right joystick + Head Tracking rotates camera), but I need to somehow intercept the rotation ...
rsanfeliu
11 years agoHonored Guest
Ok, After a bit of testing, I stumbled upon two things.
1/
I unchecked "Tracker Rotates Y" and made it follow my "CameraDirection" custom game object, which is currently rotating on its own (using a script). Nothing happens, the camera never follows my game object UNLESS I activate the OVR Camera Controller script at runtime. Then, it picks up with the current direction of my GameObject and it's working fine.
2/
For now the Game Object is rotating on its own; I'd like to keep almost everything from the OVR Gamepad Controller but prevent the Right Y Axis to be listened and followed automatically by the camera (so I can do my own business with it). Can I edit the code from this script to do such thing? I tried this, but it does nothing.
@vrdaveb Also, rotating the PlayerController does not work for me. I have to use he "Follow Direction" option.
FYI, I'm with SDK 0.4.1, DK1 and Unity Pro 4.5.4f1.
EDIT: Sorry, it's SDK 0.4.2, I mis-typed
1/
I unchecked "Tracker Rotates Y" and made it follow my "CameraDirection" custom game object, which is currently rotating on its own (using a script). Nothing happens, the camera never follows my game object UNLESS I activate the OVR Camera Controller script at runtime. Then, it picks up with the current direction of my GameObject and it's working fine.
2/
For now the Game Object is rotating on its own; I'd like to keep almost everything from the OVR Gamepad Controller but prevent the Right Y Axis to be listened and followed automatically by the camera (so I can do my own business with it). Can I edit the code from this script to do such thing? I tried this, but it does nothing.
public static float GPC_GetAxis(int axis)
{
print ("Get Axis");
if (!OVRDevice.SupportedPlatform || axis == (int) Axis.RightXAxis)
return 0.0f;
return OVR_GamepadController_GetAxis(axis);
}
@vrdaveb Also, rotating the PlayerController does not work for me. I have to use he "Follow Direction" option.
FYI, I'm with SDK 0.4.1, DK1 and Unity Pro 4.5.4f1.
EDIT: Sorry, it's SDK 0.4.2, I mis-typed
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
- 7 months ago