@Override
    public void triggerHapticAction(String actionName, float duration, float frequency, float amplitude, String restrictToInput ){
        long hapticActionHandle;
        if (!hapticActionHandles.containsKey(actionName)){
            //this is the first time the action has been used. We must obtain a handle to it to efficiently fetch it in future
            hapticActionHandle = fetchActionHandle(actionName);
            hapticActionHandles.put(actionName, hapticActionHandle);
        }else{
            hapticActionHandle = hapticActionHandles.get(actionName);
        }

        VRInput.VRInput_TriggerHapticVibrationAction(hapticActionHandle, 0, duration, frequency, amplitude, getOrFetchInputHandle(restrictToInput));
    }
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/lwjgl_openvr/LWJGLOpenVRInput.java