// Update is called once per frame //加速度センサーの値と感度の値から回転の処理 void FixedUpdate() { a = SliderSetting.getSens(); this.acceleration = Input.acceleration; this.new_acceleration = Quaternion.Euler(this.acceleration.y * a, /*player.transform.eulerAngles.y */ 0f, this.acceleration.x * -a); transform.rotation = this.new_acceleration; }
// public GameObject player; // Start is called before the first frame update // スタイダーセッティングのセンサー感度値の反映 void Start() { a = SliderSetting.getSens(); // player = transform.parent.gameObject; }