﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ReflectionProbeMove : MonoBehaviour
{
    // Start is called before the first frame update
    public Transform mirrorPlaneTransform;
    public ReflectionProbe probe;

    void Start()
    {
        
    }

    // Update is called once per frame        public ReflectionProbe probe;

    void Update()
    {
        var diffY = mirrorPlaneTransform.position.y - Camera.main.transform.position.y;

        this.probe.transform.position = new Vector3
            (
            Camera.main.transform.position.x,
            mirrorPlaneTransform.position.y - diffY,
            Camera.main.transform.position.z
            );
    }
}
