void Start() { joystickClick.AddOnUpdateListener(joystickClicked, SteamVR_Input_Sources.LeftHand); joystickClick.AddOnUpdateListener(joystickClicked, SteamVR_Input_Sources.RightHand); cameraRig = GameObject.Find("[CameraRig]"); pilot = GameObject.Find("Pilot"); headTarget = GameObject.Find("Head Target for Mech IK"); leftHandTarget = GameObject.Find("Left Hand Target for Mech IK"); rightHandTarget = GameObject.Find("Right Hand Target for Mech IK"); headTargetContraint = headTarget.GetComponent <PositionConstraint>(); leftHandTargetContraint = leftHandTarget.GetComponent <PositionConstraint>(); rightHandTargetContraint = rightHandTarget.GetComponent <PositionConstraint>(); }
// Start is called before the first frame update void Start() { sigil = GetComponent <PointSigil>(); hand = GetComponentInParent <Hand>(); createSigilAction.AddOnUpdateListener(CreateSigil, hand.handType); }
//public LineRenderer subLineRenderer; //public GameObject tempLineRendererTarget; protected override void Start() { base.Start(); blaster = GetComponent <Blaster>(); StopDrawingGrappleLighting(); doGrabAction.AddOnUpdateListener(DoGrab, parentHand.handType); relativePushPullAction.AddOnUpdateListener(SetRelativePushPullMode, parentHand.handType); }
// Start is called before the first frame update protected override void Start() { base.Start(); blaster = GetComponent <Blaster>(); lineRenderer = GetComponent <LineRenderer>(); audioSource = GetComponent <AudioSource>(); audioSource.clip = grappleAudioClip; //drawGrabAction.AddOnUpdateListener(DrawGrab, parentHand.handType); doGrabAction.AddOnUpdateListener(DoGrab, parentHand.handType); relativePushPullAction.AddOnUpdateListener(SetRelativePushPullMode, parentHand.handType); }
public override void OnSelected(Hand castingHand) { base.OnSelected(castingHand); hoverDistance = initialHoverDistance; particles.transform.position = castingHand.transform.position; particles.Play(); grabObjectAction.AddOnUpdateListener(GrabObject, castingHand.handType); pullPushAction.AddOnChangeListener(SetPullPushMode, castingHand.handType); }
public SteamVR_Action_Boolean vRThumbAnalClick; // When Button be pressed #endregion // Start is called before the first frame update void Start() { switch (vInputHardware) { default: // Occulus Touch if (vIsUsingLeft) { vLIndexClick.AddOnStateDownListener(IndexClicked, vHandType); vLIndexRest.AddOnUpdateListener(IndexRestUpdate, vHandType); vLIndexPress.AddOnUpdateListener(IndexPressUpdate, vHandType); vLMiddleClick.AddOnStateDownListener(MiddleClicked, vHandType); vLMiddleRest.AddOnUpdateListener(MiddleRestUpdate, vHandType); vLMiddlePress.AddOnUpdateListener(MiddlePressUpdate, vHandType); vLThumbX.AddOnStateDownListener(XAClicked, vHandType); vLThumbXRest.AddOnUpdateListener(XARestUpdate, vHandType); vLThumbY.AddOnStateDownListener(YBClicked, vHandType); vLThumbYRest.AddOnUpdateListener(YBRestUpdate, vHandType); vLThumbMenu.AddOnStateDownListener(MenuClicked, vHandType); vLThumbMenuRest.AddOnUpdateListener(MenuRestUpdate, vHandType); vLThumbAnal.AddOnUpdateListener(AnalAxis, vHandType); vLThumbAnalRest.AddOnUpdateListener(AnalRestUpdate, vHandType); vLThumbAnalClick.AddOnStateDownListener(AnalClicked, vHandType); } else { vRIndexClick.AddOnStateDownListener(IndexClicked, vHandType); vRIndexRest.AddOnUpdateListener(IndexRestUpdate, vHandType); vRIndexPress.AddOnUpdateListener(IndexPressUpdate, vHandType); vRMiddleClick.AddOnStateDownListener(MiddleClicked, vHandType); vRMiddleRest.AddOnUpdateListener(MiddleRestUpdate, vHandType); vRMiddlePress.AddOnUpdateListener(MiddlePressUpdate, vHandType); vRThumbA.AddOnStateDownListener(XAClicked, vHandType); vRThumbARest.AddOnUpdateListener(XARestUpdate, vHandType); vRThumbB.AddOnStateDownListener(YBClicked, vHandType); vRThumbBRest.AddOnUpdateListener(YBRestUpdate, vHandType); vRThumbAnal.AddOnUpdateListener(AnalAxis, vHandType); vRThumbAnalRest.AddOnUpdateListener(AnalRestUpdate, vHandType); vRThumbAnalClick.AddOnStateDownListener(AnalClicked, vHandType); } break; } // Set Buttons to funciton //vIndexTouch.AddOnUpdateListener(IndexTest, vHandType); //vThumbB.AddOnChangeListener(InputThumbChange, vHandType); //vIndexTouch.AddOnUpdateListener(IndexAEWDfTest, vHandType); }