When making a 2D recreation in Unity, it is usually essential to have a digital camera that follows the participant’s motion. The SmoothDamp operate can be utilized to create a easy digital camera observe impact, nevertheless it can be computationally costly. Should you’re searching for a strategy to create a easy digital camera observe impact with out utilizing SmoothDamp, there are just a few totally different approaches you possibly can take.
One strategy is to make use of the LateUpdate operate. LateUpdate is named in any case different Replace features have been referred to as, so it is a good place to replace the digital camera’s place. To make use of LateUpdate to create a easy digital camera observe impact, you possibly can merely set the digital camera’s place to the participant’s place plus an offset. The offset can be utilized to manage how far the digital camera is behind the participant.