Measurement

The Mod Extras package provides additional tools for measurement and visual communication of scale. These come in the form of MonoBehaviors that can be appended to your GameObject.

It is recommended that these MonoBehaviors are put on individual Transforms that are added to a toggle controllers, in case they need to be hidden during instructional use.

Note

The Cartesian Origin and Cartesian Grid must process during runtime in order to keep text labels aligned with the main camera and properly cull planes. It is best to deactive or destroy the entire Transform, rather than just deactivating the component, in order to properly toggle or remove the annotations.

Cartesian Gizmo Settings

A serializable object that configures the Cartesian Origin and Cartesian Grid. Be sure to include this file in your Asset Bundle when uploading your mod!

To add a Cartesian Gizmo Settings resource to your project, right-click in your project list, and press Create > CollabXR > Cartesian Gizmo Settings.

If you are confused on what any of the properties do, hover your mouse over the inspector for a tooltip.

  • The Origin Offset field specifies where (in local space) the origin of the grid should be placed, relative to the Transform. This affects both the Cartesian Origin location and how the Cartesian Grid displays measurements.

  • Individual axii can be recolored and re-labeled under their corresponding X/Y/Z Axis settings.

  • The Line Render Shader is optional, and will use a default Sprite shader or Depth-Occlusion variant if unspecified.

Cartesian Origin

A component-driven 3D gizmo that visually defines the axii of a Cartesian coordinate system.

To add a Cartesian Origin to your Prefab, add a child Transform, and then add a “Cartesian Origin” component from CollabXR.ModExtras. You will need to specify Cartesian Gizmo Settings in order to modify it.

The Cartesian Origin gizmo will be generated during runtime. However, you can optionally preview the origin in-editor using the Generate Preview button in the inspector. This will add GameObjects to the scene, but they will be recycled during run-time if you choose to leave them.

Cartesian Grid

A component-driven 3D gizmo that visually defines the boundaries and dimensions of a Cartesian coordinate system.

To add a Cartesian Grid to your prefab, add a child Transform, and then add a “Cartesian Grid” component from CollabXR.ModExtras. You will need to specify Cartesian Gizmo Settings in order to modify it.

There are additional configuration options on the Component that define what planes are rendered, how they are rendered, and the actual extents of the grid.

If the grid is not where you want, simply translate the grid and your origin as necessary. Leave the Center field of the extents as a zero vector, as it is currently unaccounted for.

The Cartesian Grid will be generated during runtime. You get a rough preview of how the grid will be shaped in-editor using the EXPERIMENTAL Preview button in the inspector. We advise deleting the GameObjects generated by the experimental preview when you are finished tweaking the Cartesian Gizmo Settings.