I want that my player walks in the direction i look in Vr but when i turn my head i want my my character to move to there . so i mean where im looking is forward but i dont get. i tryed it almost a week now and i cant figure it our pls help. i have empty object tagged Player and a child of it is the Camera tagged MainCamera.
the player has an Character Controller.
void Update()
{
if (GvrControllerInput.IsTouching)
{
ddTouchpadPos = GvrControllerInput.TouchPos;
if (ddTouchpadPos.y < 0.5f - deadZone)
{
normalizedDDTouch = new Vector3(0, 0, -0.08f);
}
if (ddTouchpadPos.y > 0.5f + deadZone)
{
normalizedDDTouch = new Vector3(0, 0, 0.07f);
}
if (ddTouchpadPos.x < 0.5f - deadZone)
{
normalizedDDTouch = new Vector3(0.07f, 0, 0);
}
if (ddTouchpadPos.x > 0.5f + deadZone)
{
normalizedDDTouch = new Vector3(-0.08f, 0, 0);
}
transform.localPosition += normalizedDDTouch;
}
}