// Update is called once per frame void Update() { if (handPresence && handPresence.GetPrimary2DAxis() != Vector2.zero) { Vector2 input = handPresence.GetPrimary2DAxis(); grabInteractable.attachTransform.RotateAround(grabInteractable.attachTransform.position, input, rotateAngle); } }
void Update() { if (handPresence && attachTransform && xrInteractor) { Vector2 input = handPresence.GetPrimary2DAxis(); if (input != Vector2.zero) { // Vector3 rot = new Vector3(input.y, input.x,0); attachTransform.RotateAround(xrInteractor.transform.position, xrInteractor.transform.right, input.y * rotSpeed * Time.deltaTime); attachTransform.RotateAround(xrInteractor.transform.position, xrInteractor.transform.forward, -input.x * rotSpeed * Time.deltaTime); // attachTransform.RotateAround(attachTransform.position, rot, rotSpeed * Time.deltaTime); } } }