protected override void EnableEditorInput() { if (!IsRootGameObject) { return; } Vio.isGrabbable = true; PlayerAppearance.InteractControllerAppearance grab = InputAdapter.Instance.PlayerAppearance.ControllerAppearance.GetFrom(GameObject) ?? InputAdapter.Instance.PlayerAppearance.ControllerAppearance.AddTo(GameObject); grab.HideControllerOnGrab = true; Vio.SwapControllersFlag = true; Vio.grabOverrideButton = ControllerInput.ButtonAlias.GripPress; Vio.InteractableObjectGrabbed += EditorGrabbed; Vio.InteractableObjectUngrabbed += EditorUngrabbed; JointBehaviour jointBehaviour = GameObject.GetComponent <JointBehaviour>(); if (jointBehaviour != null) { _onEditorGrabStart += jointBehaviour.OnGrabStart; _onEditorGrabEnd += jointBehaviour.OnGrabEnd; } }
private void InitGrabAction() { Vio.isGrabbable = true; PlayerAppearance.InteractControllerAppearance grab = InputAdapter.Instance.PlayerAppearance.ControllerAppearance.GetFrom(GameObject) ?? InputAdapter.Instance.PlayerAppearance.ControllerAppearance.AddTo(GameObject); grab.HideControllerOnGrab = true; Vio.SwapControllersFlag = true; }