When making a 2D sport in Unity, it is usually essential to have a digicam that follows the participant’s motion. The SmoothDamp operate can be utilized to create a easy digicam comply with impact, but it surely may also be computationally costly. In case you’re on the lookout for a option to create a easy digicam comply with impact with out utilizing SmoothDamp, there are a number of totally different approaches you possibly can take.
One method is to make use of the LateUpdate operate. LateUpdate known as in any case different Replace capabilities have been referred to as, so it is a good place to replace the digicam’s place. To make use of LateUpdate to create a easy digicam comply with impact, you possibly can merely set the digicam’s place to the participant’s place plus an offset. The offset can be utilized to manage how far the digicam is behind the participant.