Mira Developer Portal

The Mira Labs Developer Hub

Welcome to the Mira Labs developer hub. You'll find comprehensive guides and documentation to help you start working with the Mira headset as quickly as possible, as well as support if you get stuck. Let's jump right in!

Download the SDK

Controller Interaction and Events

Event System Setup

  • Add Mira Input Module to your scene's Event System, if you do not have an Event System create one via Game Object > UI > Event System
  • Arrange the Mira Input Module to be above other input modules that may exist on the Event System

For Canvas based UI elements

  • Create a Canvas via Game Object -> UI -> Canvas
  • Set the Canvas Component’s Render Mode to World Space in the Inspector
  • Make the Canvas a child of RotationalTracking
  • Move the Canvas to a location in your scene, usually it’s helpful to set the:
    • Scale to roughly 0.01 , 0.01, 0.01
    • Width and Height to 500
    • Pos Z (the distance from the user) to 5
  • Add a Mira Graphic Raycast to the canvas element and remove the Graphic Raycast that was automatically added to the canvas when it was created
  • Add a Button to the canvas via Game Object -> UI -> Button
  • You can use the On Click event in the inspector provided by the Button, or add an Event Trigger

For Other Objects

  • Make sure the object has a 3D Collider of some kind by selecting the game object, clicking on Add
  • Component and then Box Collider, Sphere Collider, or whichever you prefer
  • Add a Mira Physics Raycast
  • Follow directions for Event Triggers
  • How to use Event Triggers
  • Follow the steps for Canvas based UI elements or Other Objects then add an Event Trigger as a new component to aby clicking on Add Component
  • Click on Add New Event Type and choose one, like Pointer Enter
  • Click the + to add a new action to the event you chose
  • Drag any game object into the “None (Object)” field
  • Click on the “No Function” dropdown and select something you’d like to happen when the Event Type is performed

How to Script Pointer Events
See AxisSpin.cs for how to implement an EventSystem Interface for pointer event callbacks

Updated 3 years ago

Controller Interaction and Events


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.