Skip to content

Input Device

ludos1978 edited this page Jun 28, 2018 · 1 revision

Customization of Input Devices

To change the configuration of the input devices the prefabs in NetXr/Prefabs/CameraRigs must be modified. For each input devices there is a individual prefab (Mouse, VR-Controllers and/or Gaze) also containing the camera setup.

Additional Modification

More details can be defined in the NetXr/Scripts/InputDevices/... (Mouse, Gaze, Vive/VR-Controller, Camera/Gaze)

inputDevice = new InputDevice() {
    controller = controller,
    uiRaySource = uiRaySource,
    physicsRaySource = physicsRaySource,
    sphereCastPoint = sphereCastPoint,
    grabAttachementPoint = grabAttachementPoint,

    uiActivationMethod = ActivationMethod.ExternalInput,
    deviceType = InputDeviceType.Mouse,
    inputController = this,
    physicsCastType = physicsCastTypeDefault,

    showUiRaySetting = showUiRaySettingDefault,
    showPhysicsRaySetting = showPhysicsRaySettingDefault,
    uiCastActive = uiCastActiveDefault,
    physicsCastActive = physicsCastActiveDefault,
    uiPointerOffsetMode = PointerOffsetMode.screenCenter,

    physicRayColors = InputDeviceManager.Instance.defaultPhysicsRayGradient,
    physicsRayMaterial = InputDeviceManager.Instance.defaultPhysicsRayMaterial,
    uiRayColors = InputDeviceManager.Instance.defaultUiRayGradient,
    uiRayMaterial = InputDeviceManager.Instance.defaultUiRayMaterial
};