module cardboard

Services from the Google Cardboard SDK for virtual reality on Android

Projects using this module should keep the cardboard.jar archive in the libs folder at the root of the project.

External resources:

  • Download cardboard.jar from
  • Read about Cardboard at
  • Find the Cardboard SDK documentation at




  • native_app_glue: Wrapper of the Android native_app_glue framework to implement app.nit


  • cardboard: Update the orientation of world_camera at each frame using the head position given by android::cardboard
  • vr: VR support for gamnit depth, for Android only


  • android: Android platform support and APIs
    • cardboard: Services from the Google Cardboard SDK for virtual reality on Android

in android::cardboard


extern class NativeHeadTracker

Provides head tracking information from the device IMU

The corresponding Java class is no longer documented, but it is still useful.

  • new: Instantiate a new NativeHeadTracker for the given context
  • start_tracking: Start tracking head movement
  • stop_tracking: Stop tracking head movement
  • neck_model_enabled=: Enable finer analysis using the neck as center of movement
  • last_head_view: Fill matrix with the last rotation matrix calculated from head movements
  • SELF: Type of this instance, automatically specialized in every class