🕶️
NRSDK(Old)
New DocumentationSDK DownloadAPI Reference
v2.2.1
v2.2.1
  • NRSDK Fundamentals
    • NRSDK Overview
    • XREAL Devices
      • XREAL Glasses
      • Controller
      • Compatibility
    • Getting Started with NRSDK
    • Sample Code
    • Tutorials
    • Release Note
      • NRSDK 2.2.1
      • NRSDK 2.2.0
      • NRSDK 2.1.1
      • NRSDK 2.1.0
      • 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
      • XREAL Markers
    • 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
    • Spatial Anchor
      • Mapping Example Scene
      • Tutorial: Halloween Treasure Hunt
        • Handle the Situation of Failed Anchor Saving
      • Tutorial: Sharing Anchors
        • Setting Up Photon
        • Cloud Storage: Firebase (optional)
        • Cloud Storage: Aliyun OSS (optional)
        • Implementing Cloud Save and Load
        • Sharing Anchors with Photon
    • Tools
      • Single Pass Stereo Rendering
      • First Person View
      • Emulator
      • XR Streaming
      • Dual Screen Display
    • Miscellaneous
      • Access RGB Camera
      • NRSDK Coordinate Systems
      • MRTK2 Integration
      • MRTK3 Integration
      • Notification popup
      • Reset Camera
      • Render Metrics
      • Render MonoMode(Obsolete)
  • API Reference
  • Frequently Asked Questions
  • Design Guide
    • Design Guide Overview
    • Displaying
    • Interacting
    • Controlling
    • Navigating
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?