SHOW:
|
|
- or go back to the newest paste.
1 | using UnityEngine; | |
2 | using System.Collections; | |
3 | using UnityEngine.UI; | |
4 | ||
5 | public class CameraZoom : MonoBehaviour | |
6 | { | |
7 | public GameObject playah; | |
8 | public GameObject cameraPoint; | |
9 | ||
10 | public UnityEngine.UI.Text camZoomText; | |
11 | ||
12 | public float smoothTime = 1.5f; | |
13 | private float yVelocity = 0f; | |
14 | private Vector3 camVelocity = Vector3.zero; | |
15 | private float ballVelocityX; | |
16 | private float ballVelocityY; | |
17 | private float ballVelocity; | |
18 | ||
19 | ||
20 | void Start () | |
21 | { | |
22 | ||
23 | } | |
24 | ||
25 | void Update () | |
26 | { | |
27 | - | transform.position = Vector3.SmoothDamp (transform.position, cameraPoint.transform.position, ref camVelocity, smoothTime / 8f); |
27 | + | transform.position = new Vector3(playah.transform.position.x, playah.transform.position.y); |
28 | ||
29 | } | |
30 | } |