オキュラスを目線の向いてる方向へ移動するスクリプト

More than 3 years have passed since last update.


EyeCameraControll

using UnityEngine;

using System.Collections;

public class EyeCameraControll : MonoBehaviour {

//settings
public float ForwardSpeed = 0.01f;

//objects
//private Controller Controller_ = new Controller();
private Transform CameraLeft_;

void Start () {
CameraLeft_ = transform.FindChild ("CameraLeft");
}

void Update () {
//camera position
transform.position += CameraLeft_.forward * ForwardSpeed;

}
}