👋
NRSDK(Old)
v1.10.2
v1.10.2
  • NRSDK Fundamentals
    • NRSDK Overview
    • XREAL Devices
      • XREAL Glasses
      • Controller
      • Compatibility
    • Getting Started with NRSDK
    • Sample Code
    • Tutorials
    • Release Note
      • NRSDK 1.10.2
      • NRSDK 1.9.5
      • NRSDK 1.9.3
      • NRSDK 1.9.1
      • NRSDK 1.8.0
      • NRSDK 1.7.0
      • NRSDK 1.6.0
  • Development
    • Input and Camera
      • NRInput
      • Interact with Unity UI (Tutorial)
      • Customize Controller UI
      • NRCameraRig
    • Hand Tracking
    • Image Tracking
    • Plane Detection (Tutorial)
      • Overview
      • Import the package
      • Detect planes in the real world
      • Perform a hit test against detected planes
      • Add a car
      • Add gems
      • Wrap up
    • Depth Mesh
      • Meshing Manager Overview
      • Use Meshes in the Editor
      • Tutorial: Mesh Collision
    • Tools
      • First Person View
      • Emulator
      • Notification popup
      • Reset Camera
    • MRTK Integration
  • Advanced
    • Access RGB Camera
    • NRSDK Coordinate Systems
  • XR Streaming
  • Frequently Asked Questions
Powered by GitBook
On this page
  • Introduction
  • How to Add NRCameraRig in the Scene
  • Configure Settings

Was this helpful?

  1. Development
  2. Input and Camera

NRCameraRig

Introduction

The NRSDK contains the NRCameraRig prefab that provides the transform object to represent the tracking space. It contains 4 game object to fine-tune the relationship between the head tracking reference frame and your world. Under the NRCameraRig, you will find a CenterCamera, which is the main Unity camera, and two camera game objects for each eye.

How to Add NRCameraRig in the Scene

NRCameraRig is a replacement for Unity’s main camera, which means you can safely delete Unity’s main camera from the Hierarchy tab.

  1. From the Hierarchy tab, right-click Main Camera, and click Delete.

  2. In the Project tab, expand the Assets > NRSDK > Prefabs folder, and drag and drop the NRCameraRig prefab into the scene. You can also drag and drop it in the Hierarchy tab.

Configure Settings

There is just one main script attached to the NRCameraRig prefab, NRHMDPoseTracker.cs, which provides settings for the camera, display, tracking, quality, and performance of your app.

To begin with settings, in the Hierarchy tab, select NRCameraRig, and in the Inspector tab, review the following settings:

NRHMD Pose Tracker

  • Tracking Type: There are four types of tracking and the special one Tracking 0 Dof Stable enables the display's tag-along behavior depending on the current view, which is very helpful for image stabilization.

  • Tracking Mode Auto Adaption: In NRProjectConfig, you can choose the target devices of your app, and if you select this option, the Tracking Type will automatically be compatible with your target device.

  • Use Relative: Select this option to update the local transform of NRCameraRig, which means if there is a parent node of NRCameraRig, you can change its transform to change the NRCameraRig. On the contrary, the Global Transform of NRCameraRig will be updated and won't be affected by its parent node if this option is unselected.

PreviousCustomize Controller UINextHand Tracking

Last updated 1 year ago

Was this helpful?