Day 24. C# in Unity 3D. Virtual camera in cinematography.

Dmitry Gordeev
Dec 16, 2020

This is what I learned today.

How to pause a game? It is easy if in your game moving parts depends on time. Time.timeScale = 0; To resume, or slow down change the value.

Quaternions

Confusing word for beginners in 3D. It simply stores rotation coordinates and have unique methods like:

LookRotation

Follows the direction

Vector3 directionToFace = _sphere.position - transform.position;

transform.rotation = Quaternion.LookRotation(directionToFace);

Slerp

Follows the direction more smoothly with delay

transform.rotation = Quaternion.Slerp(transform.rotation, targetRotation, Time.deltaTime);

Cinematography. Pan Virtual Cameras.

With Virtual cameras and timeline, it is possible to screen movies, add effects like Fade to Alpha

--

--