Meta SDK2 Beta  2.7.0
Meta.MetaLocking Class Reference

Allow for transform locking relative to the user and/or MetaCameras. More...

Inheritance diagram for Meta.MetaLocking:
Meta.MetaBehaviour Meta.BaseMetaBehaviour< IMetaContext >

Properties

bool orbital [get, set]
 Whether the object is locked to orbital (ie. is always at a fixed distance away and always facing the user). More...
 
bool useDefaultOrbitalSettings [get, set]
 Whether the default orbital settings are used. More...
 
bool orbitalLockDistance [get, set]
 Whether the orbital locked object has their lock distance set (requires Meta.MetaBody.useDefaultOrbitalSettings to be false). More...
 
float lockDistance [get, set]
 The distance that the orbital object is locked to (requires Meta.MetaBody.useDefaultOrbitalSettings and Meta.MetaBody.userReachDistance to be false). More...
 
bool orbitalLookAtCamera [get, set]
 Whether the orbital locked object is rotated to always face the camera (user) (requires Meta.MetaBody.useDefaultOrbitalSettings to be false). More...
 
bool orbitalLookAtCameraFlipY [get, set]
 Whether orbital look at camera objects have their Y-value flipped 180 degrees. This is useful for objects that appear to be backwards (requires Meta.MetaBody.useDefaultOrbitalSettings to be false). More...
 
bool hud [get, set]
 Whether the object is locked to the HUD (ie. is always in a fixed position in the user's view, like a heads-up display). More...
 
bool useDefaultHUDSettings [get, set]
 Whether the default HUD settings should be used. More...
 
bool hudLockPosition [get, set]
 Whether the HUD locked object has its position locked (requires Meta.MetaBody.useDefaultHUDSettings to be false). More...
 
bool hudLockPositionX [get, set]
 Whether the HUD locked object has its X position locked (requires Meta.MetaBody.useDefaultHUDSettings to be false). More...
 
bool hudLockPositionY [get, set]
 Whether the HUD locked object has its Y position locked (requires Meta.MetaBody.useDefaultHUDSettings to be false). More...
 
bool hudLockPositionZ [get, set]
 Whether the HUD locked object has its Z position locked (requires Meta.MetaBody.useDefaultHUDSettings to be false). More...
 
bool hudLockRotation [get, set]
 Whether the HUD locked object has its rotation locked (requires Meta.MetaBody.useDefaultHUDSettings to be false). More...
 
bool hudLockRotationX [get, set]
 Whether the HUD locked object has its X rotation locked (requires Meta.MetaBody.useDefaultHUDSettings to be false). More...
 
bool hudLockRotationY [get, set]
 Whether the HUD locked object has its Y rotation locked (requires Meta.MetaBody.useDefaultHUDSettings to be false). More...
 
bool hudLockRotationZ [get, set]
 Whether the HUD locked object has its Z rotation locked (requires Meta.MetaBody.useDefaultHUDSettings to be false). More...
 
- Properties inherited from Meta.BaseMetaBehaviour< IMetaContext >
metaContext [get]
 Contains references to modules used to provide Meta functionality in the scene. More...
 

Detailed Description

Allow for transform locking relative to the user and/or MetaCameras.

Property Documentation

◆ hud

bool Meta.MetaLocking.hud
getset

Whether the object is locked to the HUD (ie. is always in a fixed position in the user's view, like a heads-up display).

Example usage:

using Meta;
...
MetaBody mB = gameObject.GetComponent<MetaBody>
();
mB.hud = true; // Set the object to be locked to HUD

◆ hudLockPosition

bool Meta.MetaLocking.hudLockPosition
getset

Whether the HUD locked object has its position locked (requires Meta.MetaBody.useDefaultHUDSettings to be false).

Example usage:

using Meta;
...
MetaBody mB = gameObject.GetComponent<MetaBody>
();
mB.hud = true; // Set the object to be locked to HUD
mB.useDefaultHUDSettings = false; // Disable default HUD settings
mB.hudLockPosition = false; // Stops the object's position from being fixed in the HUD

◆ hudLockPositionX

bool Meta.MetaLocking.hudLockPositionX
getset

Whether the HUD locked object has its X position locked (requires Meta.MetaBody.useDefaultHUDSettings to be false).

Example usage:

using Meta;
...
MetaBody mB = gameObject.GetComponent<MetaBody>
();
mB.hud = true; // Set the object to be locked to HUD
mB.useDefaultHUDSettings = false; // Disable default HUD settings
mB.hudLockPositionX = false; // Stops the object's X position from being fixed in the HUD

◆ hudLockPositionY

bool Meta.MetaLocking.hudLockPositionY
getset

Whether the HUD locked object has its Y position locked (requires Meta.MetaBody.useDefaultHUDSettings to be false).

Example usage:

using Meta;
...
MetaBody mB = gameObject.GetComponent<MetaBody>
();
mB.hud = true; // Set the object to be locked to HUD
mB.useDefaultHUDSettings = false; // Disable default HUD settings
mB.hudLockPositionY = false; // Stops the object's Y position from being fixed in the HUD

◆ hudLockPositionZ

bool Meta.MetaLocking.hudLockPositionZ
getset

Whether the HUD locked object has its Z position locked (requires Meta.MetaBody.useDefaultHUDSettings to be false).

Example usage:

using Meta;
...
MetaBody mB = gameObject.GetComponent<MetaBody>
();
mB.hud = true; // Set the object to be locked to HUD
mB.useDefaultHUDSettings = false; // Disable default HUD settings
mB.hudLockPositionZ = false; // Stops the object's Z position from being fixed in the HUD

◆ hudLockRotation

bool Meta.MetaLocking.hudLockRotation
getset

Whether the HUD locked object has its rotation locked (requires Meta.MetaBody.useDefaultHUDSettings to be false).

Example usage:

using Meta;
...
MetaBody mB = gameObject.GetComponent<MetaBody>
();
mB.hud = true; // Set the object to be locked to HUD
mB.useDefaultHUDSettings = false; // Disable default HUD settings
mB.hudLockRotation = false; // Stops the object's rotation from being fixed in the HUD

◆ hudLockRotationX

bool Meta.MetaLocking.hudLockRotationX
getset

Whether the HUD locked object has its X rotation locked (requires Meta.MetaBody.useDefaultHUDSettings to be false).

Example usage:

using Meta;
...
MetaBody mB = gameObject.GetComponent<MetaBody>
();
mB.hud = true; // Set the object to be locked to HUD
mB.useDefaultHUDSettings = false; // Disable default HUD settings
mB.hudLockRotationX = false; // Stops the object's X rotation from being fixed in the HUD

◆ hudLockRotationY

bool Meta.MetaLocking.hudLockRotationY
getset

Whether the HUD locked object has its Y rotation locked (requires Meta.MetaBody.useDefaultHUDSettings to be false).

Example usage:

using Meta;
...
MetaBody mB = gameObject.GetComponent<MetaBody>
();
mB.hud = true; // Set the object to be locked to HUD
mB.useDefaultHUDSettings = false; // Disable default HUD settings
mB.hudLockRotationY = false; // Stops the object's Y rotation from being fixed in the HUD

◆ hudLockRotationZ

bool Meta.MetaLocking.hudLockRotationZ
getset

Whether the HUD locked object has its Z rotation locked (requires Meta.MetaBody.useDefaultHUDSettings to be false).

Example usage:

using Meta;
...
MetaBody mB = gameObject.GetComponent<MetaBody>
();
mB.hud = true; // Set the object to be locked to HUD
mB.useDefaultHUDSettings = false; // Disable default HUD settings
mB.hudLockRotationZ = false; // Stops the object's Z rotation from being fixed in the HUD

◆ lockDistance

float Meta.MetaLocking.lockDistance
getset

The distance that the orbital object is locked to (requires Meta.MetaBody.useDefaultOrbitalSettings and Meta.MetaBody.userReachDistance to be false).

Example usage:

using Meta;
...
MetaBody mB = gameObject.GetComponent<MetaBody>
();
mB.orbital = true; // Set the object to be locked to orbital
mB.useDefaultOrbitalSettings = false; // Disable default orbital settings
mB.userReachDistance = false; // Override the orbital lock distance
mB.lockDistance = 0.5f; // Locks the object to be 0.5m away (default: 0.4)

◆ orbital

bool Meta.MetaLocking.orbital
getset

Whether the object is locked to orbital (ie. is always at a fixed distance away and always facing the user).

Example usage:

using Meta;
...
MetaBody mB = gameObject.GetComponent<MetaBody>
();
mB.orbital = true; // Set the object to be locked to orbital

◆ orbitalLockDistance

bool Meta.MetaLocking.orbitalLockDistance
getset

Whether the orbital locked object has their lock distance set (requires Meta.MetaBody.useDefaultOrbitalSettings to be false).

Example usage:

using Meta;
...
MetaBody mB = gameObject.GetComponent<MetaBody>
();
mB.orbital = true; // Set the object to be locked to orbital
mB.useDefaultOrbitalSettings = false; // Disable default orbital settings
mB.orbitalLockDistance = false; // Allow object to be moved to any distance

◆ orbitalLookAtCamera

bool Meta.MetaLocking.orbitalLookAtCamera
getset

Whether the orbital locked object is rotated to always face the camera (user) (requires Meta.MetaBody.useDefaultOrbitalSettings to be false).

Example usage:

using Meta;
...
MetaBody mB = gameObject.GetComponent<MetaBody>
();
mB.orbital = true; // Set the object to be locked to orbital
mB.useDefaultOrbitalSettings = false; // Disable default orbital settings
mB.orbitalLookAtCamera = false; // Disable automatic rotation of object to face the camera

◆ orbitalLookAtCameraFlipY

bool Meta.MetaLocking.orbitalLookAtCameraFlipY
getset

Whether orbital look at camera objects have their Y-value flipped 180 degrees. This is useful for objects that appear to be backwards (requires Meta.MetaBody.useDefaultOrbitalSettings to be false).

Example usage:

using Meta;
...
MetaBody mB = gameObject.GetComponent<MetaBody>
();
mB.orbital = true; // Set the object to be locked to orbital
mB.useDefaultOrbitalSettings = false; // Disable default orbital settings
mB.orbitalLookAtCameraFlipY = true; // Flip object along Y axis by 180 degrees

◆ useDefaultHUDSettings

bool Meta.MetaLocking.useDefaultHUDSettings
getset

Whether the default HUD settings should be used.

Example usage:

using Meta;
...
MetaBody mB = gameObject.GetComponent<MetaBody>
();
mB.hud = true; // Set the object to be locked to HUD
mB.useDefaultHUDSettings = false; // Disable default HUD settings
mB.hudLockPosition = false; // Stops the object's position from being fixed in the HUD

◆ useDefaultOrbitalSettings

bool Meta.MetaLocking.useDefaultOrbitalSettings
getset

Whether the default orbital settings are used.

Example usage:

using Meta;
...
MetaBody mB = gameObject.GetComponent<MetaBody>
();
mB.orbital = true; // Set the object to be locked to orbital
mB.useDefaultOrbitalSettings = false; // Disable default orbital settings
mB.orbitalLockDistance = false; // Allow object to be moved to any distance