Note: The Meta HUD Locking system is incompatible with Asynchronous Rendering when using 2D or 3D warp. The locked objects will be re-projected with the world locked scene, and this will result in judder.
The Meta Locking feature allows for Unity GameObjects to be spatially constrained relative to the MetaCameraRig object in several ways. This is useful for achieving a wide range of effects such as creating a heads-up display.
The following options are available. See below for details.
HUD - Checking this box enables heads-up display (HUD) locking mode and allows you to further customize HUD mode options.
Default HUD Settings - The associated GameObject will maintain its position and rotation relative to the MetaCameraRig regardless of changes to the position and/or rotation of the MetaCameraRig. In other words, the associated GameObject will appear at the same location within the display’s screen space regardless of how the user’s head moves, as if it were a child of the MetaCameraRig. When this box is not checked, finer-grained control of locking is exposed for each axis.
Lock Position x/y/z - These checkboxes control whether the position of the associated GameObject is locked relative to the MetaCameraRig’s translational movement along each of the axes.
Lock Rotation x/y/z - These checkboxes control whether the rotation of the associated GameObject is locked relative to the MetaCameraRig’s rotational movement about each of the axes.
Note: to have hudlocked UI appear correctly when 3D warp is enabled, you will need to attach a MetaUIContent component to the GameObject containing the UI.
Orbital - Checking this box enables orbital locking mode and allows you to further customize orbital mode options.
Default Orbital Settings - The associated GameObject will always face the MetaCameraRig. It also maintains a fixed distance of 0.4 meters from the MetaCameraRig.
Lock Distance - The associated GameObject will maintain the specified distance from the MetaCameraRig. Please note that objects beyond 10 meters away from the MetaCameraRig will not appear; see here for details.
Look At Camera - The associated GameObject will always rotate to face the MetaCameraRig. This is useful for mimicking traditional billboard sprite techniques.
- Flip Y - The associated GameObject will be inverted. Check this box if the associated GameObject appears to be upside-down.
To use the Meta Locking feature, attach the Meta Locking component to the GameObject that you wish to lock:
1. In the Hierarchy window, select the GameObject that you wish to lock.
2. In the Inspector window, click Add Component.
3. Select Meta Locking and add it.
4. Configure the Meta Locking script by using the check boxes in the inspector.
5. Try it out!