Quantcast
Channel: Answers by "sysameca"
Viewing all articles
Browse latest Browse all 85

Answer by sysameca

$
0
0
Just store the initial camera Y position and assign it later to the movement vector; private float startingY; private void Start() { startingY = transform.position.y; } private void Update() { Vector3 position = Vector3.SmoothDamp( transform.position, target.position - leftOffset, ref _smoothDampVelocity, smoothDampTime ); position.y = startingY; transform.position = position; }

Viewing all articles
Browse latest Browse all 85

Latest Images

Trending Articles



Latest Images