Пример #1
0
 public abstract string GetControllerElementPath(ControllerElelements element, VRTK_DeviceFinder.ControllerHand hand);
Пример #2
0
        public override string GetControllerElementPath(ControllerElelements element, VRTK_DeviceFinder.ControllerHand hand)
        {
            switch (element)
            {
            case ControllerElelements.AttachPoint:
                return("Model/tip/attach");

            case ControllerElelements.Trigger:
                return("Model/trigger");

            case ControllerElelements.GripLeft:
                return("Model/lgrip");

            case ControllerElelements.GripRight:
                return("Model/rgrip");

            case ControllerElelements.Touchpad:
                return("Model/trackpad");

            case ControllerElelements.ApplicationMenu:
                return("Model/button");

            case ControllerElelements.SystemMenu:
                return("Model/sys_button");

            case ControllerElelements.Body:
                return("Model/body");
            }
            return(null);
        }
Пример #3
0
 public static string GetControllerElementPath(VRTK_ControllerElements element, VRTK_DeviceFinder.ControllerHand hand = VRTK_DeviceFinder.ControllerHand.Right, bool fullPath = false)
 {
     return(GetControllerSDK().GetControllerElementPath(element, hand, fullPath));
 }
Пример #4
0
 /// <summary>
 /// The GetControllerElementPath returns the path to the game object that the given controller element for the given hand resides in.
 /// </summary>
 /// <param name="element">The controller element to look up.</param>
 /// <param name="hand">The controller hand to look up.</param>
 /// <param name="fullPath">Whether to get the initial path or the full path to the element.</param>
 /// <returns>A string containing the path to the game object that the controller element resides in.</returns>
 public abstract string GetControllerElementPath(VRTK_ControllerElements element, VRTK_DeviceFinder.ControllerHand hand, bool fullPath = false);
 public static string GetControllerElementPath(SDK_Base.ControllerElelements element, VRTK_DeviceFinder.ControllerHand hand = VRTK_DeviceFinder.ControllerHand.Right)
 {
     return(GetActiveSDK().GetControllerElementPath(element, hand));
 }
Пример #6
0
 /// <summary>
 /// The GetControllerElementPath returns the path to the game object that the given controller element for the given hand resides in.
 /// </summary>
 /// <param name="element">The controller element to look up.</param>
 /// <param name="hand">The controller hand to look up.</param>
 /// <param name="fullPath">Whether to get the initial path or the full path to the element.</param>
 /// <returns>A string containing the path to the game object that the controller element resides in.</returns>
 public override string GetControllerElementPath(VRTK_ControllerElements element, VRTK_DeviceFinder.ControllerHand hand, bool fullPath = false)
 {
     return("");
 }
Пример #7
0
        /// <summary>
        /// The GetControllerElementPath returns the path to the game object that the given controller element for the given hand resides in.
        /// </summary>
        /// <param name="element">The controller element to look up.</param>
        /// <param name="hand">The controller hand to look up.</param>
        /// <param name="fullPath">Whether to get the initial path or the full path to the element.</param>
        /// <returns>A string containing the path to the game object that the controller element resides in.</returns>
        public override string GetControllerElementPath(VRTK_ControllerElements element, VRTK_DeviceFinder.ControllerHand hand, bool fullPath = false)
        {
            var suffix = (fullPath ? "/attach" : "");

            switch (element)
            {
            case VRTK_ControllerElements.AttachPoint:
                return("Model/tip/attach");

            case VRTK_ControllerElements.Trigger:
                return("Model/trigger" + suffix);

            case VRTK_ControllerElements.GripLeft:
                return("Model/lgrip" + suffix);

            case VRTK_ControllerElements.GripRight:
                return("Model/rgrip" + suffix);

            case VRTK_ControllerElements.Touchpad:
                return("Model/trackpad" + suffix);

            case VRTK_ControllerElements.ApplicationMenu:
                return("Model/button" + suffix);

            case VRTK_ControllerElements.SystemMenu:
                return("Model/sys_button" + suffix);

            case VRTK_ControllerElements.Body:
                return("Model/body");
            }
            return(null);
        }