Example #1
0
 // Update is called once per frame
 void Update()
 {
     if (isSweeping)
     {
         timer += Time.unscaledDeltaTime * speed_scale;
         //transform.position = fromPos + (Vector3.up * ac.Evaluate(timer) * curve_scale);
         if (timer >= 1.0f)
         {
             isSweeping        = false;
             dynCamera.enabled = true;
             audioMaster.ArtificialStart();
         }
         Vector3 diff = toPos - fromPos;
         transform.position = fromPos + diff * ac.Evaluate(timer);
     }
 }
 // Start is called before the first frame update
 void Start()
 {
     am.ArtificialStart();
 }