1 using System.Collections;
2 using System.Collections.Generic;
7 using AVR.Core.Attributes;
11 [CreateAssetMenu(fileName =
"MovementRestrictor", menuName =
"arc-vr/motion/MovementRestrictor", order = 1)]
17 [Header(
"Limit by gameObject tag")]
18 public bool limitTPLocation_byTag =
false;
23 [Header(
"Limit by gameObject layer")]
24 public bool limitTPLocation_byLayer =
false;
29 [Header(
"Limit by maximum slope")]
30 public bool limitTPLocation_bySlope =
false;
37 if (limitTPLocation_bySlope && Vector3.Angle(Vector3.up, loc.normal) > validTPmaxSlope)
return false;
38 if (limitTPLocation_byTag && !loc.collider.gameObject.CompareTag(validTPTag))
return false;
39 if (limitTPLocation_byLayer && (validTPLayers & 1 << loc.collider.gameObject.layer) < 1)
return false;
When using a MovementProvider, this scriptable object allows you to set rules for which surfaces qual...
Sets the documentation html file inside of Packages/com.avr.core/Documentation/html of a given class...
bool isValidTpLocation(RaycastHit loc)
Allows for simple hiding of properties in the UnityEditor depending on certain conditions. For instance, in the following example the "type" field will only be displayed in the inspector if the "tracking" field is set to true: