liu.yan Posted October 18, 2016 Share Posted October 18, 2016 Document of engine.vive don't match the sample: app_vive_00. In the sample: float trigger_position = engine.vive.getControllerAxis(CONTROLLER_DEVICE_0,1).x; In the document: int engine.vive.getControllerAxis(int device) Obviously, the function on the document won't compile. Where can I get the lastest documentation of this script class? So that I can control the player's walking by the buttons on the vive handle. Link to comment
silent Posted October 18, 2016 Share Posted October 18, 2016 liu.yan, Thank you for noticing that. Correct signature: vec2 getControllerAxis(int device, int axis); where axis: CONTROLLER_AXIS_NONE = 0 CONTROLLER_AXIS_TRACKPAD = 1 CONTROLLER_AXIS_JOYSTICK = 2 CONTROLLER_AXIS_TRIGGER = 3 Returns vec3 where x and y are: [-1;1] (for trigger [0;1]) and z component always zero. Will update docs ASAP. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
liu.yan Posted October 19, 2016 Author Share Posted October 19, 2016 hurry, man. i am using it to do some demonstrations for my boss this Friday. Link to comment
qubblr Posted October 19, 2016 Share Posted October 19, 2016 liu.yan, We've updated documentation of getControllerAxis() and other methods of the engine.vive class. It's now available in the online docs: https://developer.unigine.com/en/docs/2.3.1/api/library/plugins/engine.vive?rlang=usc Link to comment
Recommended Posts