Quantcast
Channel: Questions in topic: "follow"
Viewing all articles
Browse latest Browse all 536

Camera follow smoothness problem

$
0
0
Camera is moving too smooth how can i make it to be fast? tried messing around with my smoothTime variable but no success. code: public var player : GameObject; var smoothTime = 0.0; private var yVelocity = 0.0; function Update () { var newPosition : float = Mathf.SmoothDamp(transform.position.y, player.transform.position.y+7.7f, yVelocity, smoothTime); transform.position = Vector3(transform.position.x, newPosition, transform.position.z); } EDIT: Actually i dont even need smoothness, but i need this because im changing the camera folow position, camera's normal following position is players - 5f but when the player dies i want to change my camera's position to -8f but if I do it with normal camera follow script its changing instantly and its not nice, so i need the camera to shift from -5 to -8.

Viewing all articles
Browse latest Browse all 536

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>