@Override
    public void setImage(String texture) {
        if (environment != null){

            if (environment.getApplication() != null){
                if( environment.isInVR() == false ){
                    Texture tex = environment.getApplication().getAssetManager().loadTexture(texture);
                    mouseImage.setTexture(environment.getApplication().getAssetManager(), (Texture2D)tex, true);
                    ySize = tex.getImage().getHeight();
                    mouseImage.setHeight(ySize);
                    mouseImage.setWidth(tex.getImage().getWidth());
                    mouseImage.getMaterial().getAdditionalRenderState().setBlendMode(BlendMode.Alpha);
                    mouseImage.getMaterial().getAdditionalRenderState().setDepthWrite(false);
                } else {
                    Texture tex = environment.getApplication().getAssetManager().loadTexture(texture);
                    mouseImage.setTexture(environment.getApplication().getAssetManager(), (Texture2D)tex, true);
                    ySize = tex.getImage().getHeight();
                    mouseImage.setHeight(ySize);
                    mouseImage.setWidth(tex.getImage().getWidth());
                    mouseImage.getMaterial().getAdditionalRenderState().setBlendMode(BlendMode.Alpha);
                    mouseImage.getMaterial().getAdditionalRenderState().setDepthWrite(false);
                }
            } else {
                throw new IllegalStateException("This VR environment is not attached to any application.");
            }

        } else {
          throw new IllegalStateException("This VR view manager is not attached to any VR environment.");
        }
    }
Create a new AbstractVRMouseManager attached to the given {@link VREnvironment VR environment}.
@param environment the {@link VREnvironment VR environment} that this manager is attached to.
jme3-vr/src/main/java/com/jme3/input/vr/AbstractVRMouseManager.java