I’ve been trying to get the oculus rift library to work inside the JME IDE. I tried to follow the instructions and get help from the irc channel. Without much success. Here are all the things that I tried.
Checkout the jmonkeyengine-oculus-rift code from here.
Get the stable 3.0 Phr00t version of JME here. (I tried this later with 3.1)
ant build in the Phr00t JME.
ant build-zip-for-installer inside the sdk folder.
Unzip the newly created jmeplatform inside /sdk/dist
Open the jmonkeyengine-oculus-rift project in this new jmeplatform
Added the following jar files:
jna-4.1.0.jar
guava-17.0.jar
jovr-0.4.4.0.jar
JMonkeyOculusRift.jar
Run the project
I need to add a line of text here to get the numbering right.
Open my own install of JME.
Install the Oculus Rift Support plugin from Tools-Plugins-Available Plugins.
Open the jmonkeyengine-oculus-rift project.
Add the Oculus Rift Support library to this project plus these from the project folder:
jna-4.1.0.jar
guava-17.0.jar
jovr-0.4.4.0.jar
Run the project
I would like to first know what the correct way is to install and use this library before I start to post the error messages. As you can see I didn’t just give up after 10 minutes. I just don’t know how this works.
It looks like a library issue, even though you seem to have the correct ones.
If you are running the jMonkeyOculusRift project directly, you don’t need the OculusRift - OVR - Support lib added. That might actually be the issue here.
Also, you actually don’t need to compile the SDK. It’s enough if you build the engine and add the jar files from it.
I recently cloned phr00t’s JME build and I’m also trying to setup and I’m stuck with building the project. Did the project change from ant to gradle? Because I don’t see any build.xml. Also, the build fails when I try to ‘gradle’ in the command prompt, giving this error:
In general, if you build a gradle-based project that has gradlew setup and a regular gradle build fails… then try the gradlew wrapper… because it could be a gradle version issue.
Edit: nvm the launcher problem, it gets fixed when I set to duplicate mode instead of Direct mode
Edit2: nvm everything below this edit. Turns out I’m just an idiot for reusing the 3-month old example and trying to make it work. It seems fine now, though I wonder how can I show the game screen on DK1 with extended display, because right now I just duplicate my display to show on my DK1, but it’s difficult to program on my main display with low resolution.
nvm that. I added the 4 jars from the jmonkeyengine-virtual-reality, the Oculus VR Support plugin library, and the jars at jmonkeyengine/dist/lib/ and it seems to run without errors.
The problem now is the launcher gets fed up when I changed SimpleApplication into VRApplication, though it apparently gets fixed when I clicked on the dropdown buttons. Another problem is when I launch the game it’s also fed up, the vignette shows and the screen is flickering crazily, I can’t get a screenshot of it because it’s like turning on and off very fast.
This is my code, which is based from the example in jmonkeyengine-virtual-reality, which is already outdated.
Edit: removed code
I have no idea what the problem is, especially because I’m also new to JMonkeyEngine.
where sould i copy the jars? i copied and replaced them fromj monkeyengine-master\dist\lib to jmonkeyengine/libs and jmonkeyengine-master\lib to jmonkeyengine/libs, is this done right?
EDIT:
nevermind, got it running.
all jars nee to be added as libraries. the orginal ones have to be removed.