söndag 22 februari 2015

Google Cardboard support for jMonkeyEngine

I've just commited support for Google Cardboard in jMonkeyEngine 3. I plan on doing a post with more details of the inner-workings, but in the meantime here's a brief outline and how to use it.

First of all, it's a completely separate integration from the Android VR support project I started. This uses the Google Cardboard API directly and in a way that didn't fit with the architecture in that project.

Why is it useful?

It enables those who wish to use a complete game development package to deploy their application as a Google Cardboard app.

So, how do I use it?

Download the jme-cardboard.jar from the repo and add it to your jMonkeyEngine project.
  1. Turn on Android deployment for your project (Properties/Application/Android)
  2. In the generated MainActivity.java (Important Files/Android Main Activity) have it extend CardboardHarness instead of AndroidHarness.
  3. Change the appClass in the same to your project's application file.
That should be it. For an example application, check out CardboardStarTravel example in the test package.



If you wish to build the sources, it needs to have an android.jar attached to the project.



Known issues.
Drift with the accelerometer is pretty bad. Don't know if there is anything to do about it on the application side.
Movement is fairly jittery. Adding a filter for the accelerometer might be desirable.


Like I said, there will be more to come!

Inga kommentarer:

Skicka en kommentar