Hello! This is my first time posting here, so excuse any inexperience.
I am using Cinemachine 2D for a platformer. When I respawn, the camera seems to be offset in the direction you were moving previously. This only happens when the look-ahead time is greater than zero. Moving after respawning will slowly move the camera back into place.
Code for respawn (other is the target of the camera, being ran in a seperate script):
other.transform.position = _respawnPoint.position;
- Disabling and re-enabling the cinemachine component on the main camera
- Disabling and re-enabling the player
- Cheating the way by slightly moving forward works slightly as look-ahead seems to work over time. Therefore making it not noticeable isn’t possible
It is possible that there is no solution.
Thank you in advance!