@Override
    public Vector3f getAngularVelocity(int controllerIndex) {
        if (environment != null){
            if (environment.getVRHardware() instanceof OpenVR){

                int index = OpenVRInput.controllerIndex[controllerIndex];
                if( needsNewAngVelocity[index] ) {
                    ((OpenVR)environment.getVRHardware()).hmdTrackedDevicePoses[index].readField("vAngularVelocity");
                    needsNewAngVelocity[index] = false;
                }
                tempVel.x = ((OpenVR)environment.getVRHardware()).hmdTrackedDevicePoses[index].vAngularVelocity.v[0];
                tempVel.y = ((OpenVR)environment.getVRHardware()).hmdTrackedDevicePoses[index].vAngularVelocity.v[1];
                tempVel.z = ((OpenVR)environment.getVRHardware()).hmdTrackedDevicePoses[index].vAngularVelocity.v[2];
                return tempVel;
            } else {
                throw new IllegalStateException("VR hardware "+environment.getVRHardware().getClass().getSimpleName()+" is not a subclass of "+OpenVR.class.getSimpleName());
            }
        } else {
            throw new IllegalStateException("VR input is not attached to a VR environment.");
        }
    }
Create a new <a href="https://github.com/ValveSoftware/openvr/wiki/API-Documentation">OpenVR</a> input attached to the given VR environment.
@param environment the VR environment to which the input is attached.
jme3-vr/src/main/java/com/jme3/input/vr/openvr/OpenVRInput.java