forget everything I've said before this is the fix for it!
if you use the Steam VR Prefab do not remove any child objects just simply use the code or something like it.
I was trying to turn the body which was the play area.... dont do that...
I'm showing this code because there was no documentation on how to do this anywhere online. I was just messing with the overloads of the transform.Translate when I found this method.
- using UnityEngine;
- using Valve.VR;
- public class PlayerMove : MonoBehaviour
- public SteamVR_Action_Vector2 touchPadAction;
- public float movementSpeed = 0.5f;
- public Camera Head;
- void Update ()
- void TouchPadMovement()
- Vector2 leftTouchpadValue = touchPadAction.GetAxis(SteamVR_Input_Sources.LeftHand);
- if (leftTouchpadValue != Vector2.zero)
- float moveX = leftTouchpadValue.x * movementSpeed * Time.deltaTime;
- float movez = leftTouchpadValue.y * movementSpeed * Time.deltaTime;
- Vector3 touchPadInput = new Vector3(moveX,0, movez);
- transform.Translate(touchPadInput, Head.transform);