Hey,
im trying to transition between cameras using cinemachine by manipulating priority values on given cameras. tho the priority values are changing as expected, the cameras themselves arent transitioning so im not really sure whats going on.
here is the logic for my priority stuff
any help is appreciated :))
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Cinemachine;
public class PlayerCamera : MonoBehaviour
{
public CinemachineVirtualCamera[] cams;
public CinemachineVirtualCamera movementCam;
public CinemachineVirtualCamera diceCam;
public CinemachineVirtualCamera startCam;
private CinemachineVirtualCamera currentCam;
// Start is called before the first frame update
void Start()
{
currentCam = startCam;
for(int i = 0; i < cams.Length; i++)
{
if(cams[i] == currentCam)
{
cams[i].Priority = 1;
}
else
{
cams[i].Priority = 0;
}
}
}
public void switchCam(CinemachineVirtualCamera newCam)
{
currentCam = newCam;
currentCam.Priority = 1;
for(int i = 0;i < cams.Length; i++)
{
if (cams[i] != currentCam)
{
cams[i].Priority = 0;
}
}
}
}