0
\$\begingroup\$

I want to show a cinematic view of my scene and then be able to play it with the camera attached to my player.

I have set up a dolly track and virtual camera and all works fine but I can't then play as my main character.

How can I do this?

\$\endgroup\$
2
  • 2
    \$\begingroup\$ Searching for "cinemachine switch camera" turns up lots of results. What have you tried based on your research thus far? How do the results differ from what you want? \$\endgroup\$
    – DMGregory
    Nov 23 at 15:30
  • \$\begingroup\$ @DMGregory i ave 1 main cam and i virtual cam they all say with 2 virtual cams \$\endgroup\$
    – user158448
    Nov 23 at 15:33
2
\$\begingroup\$

You setup up two virtual Cams. One for your Cinematic View and one for your Playercharacter. The thing about the Cinemachine is, that the "real" camera switches to the position and paramteres of the virtual cameras. You can do the switching via the timeline, which isn't so flexibel https://docs.unity3d.com/Packages/com.unity.cinemachine@2.3/manual/CinemachineTimeline.html

or which seems for you more suitable via script and a "playbale director". Just create an empty with a box collider, playable director and following script

public class CinematicsTrigger : MonoBehaviour
    {
        bool alreadyTriggerd = false;


        private void OnTriggerEnter(Collider other)
        {
            if (!alreadyTriggerd && other.gameObject.tag == "Player")
            {
                alreadyTriggerd = true;
                GetComponent<PlayableDirector>().Play();
            }
            
        }
    }

In the playbale director you need to reference a "playbale" "Timeline Asset". A Timeline assets contains the virtualcameras for your cinematic. You can create a Timeline via rmb>create>Timeline https://docs.unity3d.com/2017.1/Documentation/Manual/class-PlayableDirector.html

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy