API reference
API reference
Select your platform
No SDKs available
No versions available

OVRDebugHeadController Class

Extends MonoBehaviour
This is a simple behavior that can be attached to a parent of the CameraRig in order to provide movement via the gamepad.
This is useful when testing an application in the Unity editor without the HMD. To use it, create a game object in your scene and drag your CameraRig to be a child of the game object. Then, add the OVRDebugHeadController behavior to the game object. Alternatively, this behavior can be placed directly on the OVRCameraRig object, but that is not guaranteed to work if OVRCameraRig functionality changes in the future. In the parent case, the object with OVRDebugHeadController can be thougt of as a platform that your camera is attached to. When the platform moves or rotates, the camera moves or rotates, but the camera can still move independently while "on" the platform. In general, this behavior should be disabled when not debugging.

Fields

Allows gamepad input to control camera pitch, meaning the ability to look up and down.
By default, this is disabled.
Allows gamepad input to control camera yaw, meaning the ability to look left and right.
By default, this is enabled.
Inverts gamepad input when controlling camera pitch relative to the default behavior, meaning the same input will have the opposite effect on pitch when this is enabled versus when it's disabled.
This setting is disabled by default, and it has no effect if AllowPitchLook is disabled.
Controls the maximum rate, in degrees per second, at which gamepad input can change the camera's pitch.
Has no effect if AllowPitchLook is disabled.
Controls the maximum rate, in degrees per second, at which gamepad input can change the camera's yaw.
Has no effect if AllowYawLook is disabled.
Allows gamepad input to control movement; if enabled, the gamepad will be able to translate the camera rig continuously (as opposed to via teleport).
Controls the maximum speed, in meters per second, that gamepad input can move the camera rig along its forward/back axis.
Has no effect if AllowMovement is disabled.
Controls the maximum speed, in meters per second, that gamepad input can move the camera rig along its left/right axis.
Has no effect if AllowMovement is disabled.

Protected Fields

OVRCameraRig CameraRig[Get]
Did you find this page helpful?
Thumbs up icon
Thumbs down icon