Open DatanIMU opened 3 weeks ago
{ "jsonid": "input_profile", "controller_type": "mycontroller", "input_bindingui_mode": "single_device", "input_bindingui_left": { "image": "{simplecontroller}/icons/sample_controller.svg" }, "input_bindingui_right": { "image": "{simplecontroller}/icons/sample_controller.svg" }, "input_source": { "/input/a": { "binding_image_point": [ 80, 60 ], "type": "button", "touch": true, "order": 1 }, "/input/b": { "binding_image_point": [ 80, 60 ], "type": "button", "touch": true, "order": 2 }, "/input/joystick": { "binding_image_point": [ 80, 60 ], "type": "joystick", "click": true, "touch": true, "order" : 3 }, "/input/trackpad": { "binding_image_point": [ 80, 60 ], "type": "trackpad", "force" : true, "click": true, "touch": true, "order" : 4 } }, "default_bindings": [] }
when code like this, everything is OK vr::VRDriverInput()->CreateScalarComponent(container, "/input/joystick/x", &inputhandles[MyComponent_joystick_x], vr::VRScalarType_Absolute, vr::VRScalarUnits_NormalizedTwoSided); r::VRDriverInput()->CreateScalarComponent(container, "/input/joystick/y", &inputhandles[MyComponent_joystick_y], vr::VRScalarType_Absolute, vr::VRScalarUnits_NormalizedTwoSided);
vr::VRDriverInput()->UpdateScalarComponent(inputhandles[MyComponent_joystick_x], 0.4, 0.0); vr::VRDriverInput()->UpdateScalarComponent(inputhandles[MyComponent_joystick_y], 0.4, 0.0);
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!