Commit 68fe5f83 authored by Yuriy Votintsev's avatar Yuriy Votintsev
Browse files

Auto find head in rig. Remove log spam.

No related merge requests found
Pipeline #26 failed with stages
in 0 seconds
Showing with 5 additions and 5 deletions
+5 -5
......@@ -4,15 +4,16 @@ namespace Warpoint.SimpleVrMove
{
public class VRCameraMove : MonoBehaviour
{
private SimpleVrMoveInput _input;
[SerializeField] private Transform _head;
public float MoveSpeed;
public float RotateSpeed;
private SimpleVrMoveInput _input;
private Transform _head;
private void Awake()
{
_input = new SimpleVrMoveInput();
_head = GetComponentInChildren<Camera>().transform;
}
private void OnEnable()
......@@ -31,8 +32,6 @@ namespace Warpoint.SimpleVrMove
var verticalMove = _input.VR.VerticalMove.ReadValue<float>();
var rotate = _input.VR.Rotate.ReadValue<float>();
Debug.Log(verticalMove);
RotateCamera(rotate);
MoveCamera(horizontalMove, verticalMove);
}
......@@ -42,6 +41,7 @@ namespace Warpoint.SimpleVrMove
var forward = _head.forward;
forward.y = 0;
forward.Normalize();
var right = _head.right;
right.y = 0;
right.Normalize();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment