Jump to content

[SOLVED] Document of engine.vive don't match the sample


photo

Recommended Posts

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

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:

Link to comment
×
×
  • Create New...