While switching my camera system on Super Space Arcade from a classic camera rig to Cinemachine, I stumbled over an issue where the virtual camera would change its position smoothly, even though I set the transform to a new value. In my case, I need a hard reset of the camera position for the linear track being reset, to not run into overflow errors.
The way this can be achieved with Cinemachine I dug up somewhere in the forums, is
The first parameter is the moving objects transform, the second is the transform offset. In my case, the code looks something like this
CinemachineVirtualCamera vcam = this.GetComponent<CinemachineVirtualCamera>();
vcam.OnTargetObjectWarped(playerTransform, new Vector3(0,0,-trackResetZ);
Say you want to load a scene asynchronously and need to trigger an event right after the scene has loaded, a quick two-liner does the job.
AsyncOperation asyncLoad = SceneManager.LoadSceneAsync(this.DefaultLevel, LoadSceneMode.Additive);
asyncLoad.completed += operation => MessageDispatcher.SendMessage("MENU_START");
After setting up Mojave on my MacBook I realized I’ve had to install the XBox 360 Controller driver again. Somehow that was really hard to find among many outdated sources, so I’m putting this here for anyone searching for it and myself for future reference.
The driver is available at Github here.