- Home /
How do I implement this Camera Tracking?
Hello everyone. I would like to know how to implement the camera tracking mechanism in this game: http://www.youtube.com/watch?v=t1BmumLZKQ0
Currently, this is my camera script: using UnityEngine; using System.Collections;
public class CameraRunnerScript : MonoBehaviour { public Transform player; public float cameraXPos = 5.6f; public float cameraYPos = 2.46f;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
transform.position = new Vector3 (player.position.x + cameraXPos, cameraYPos, -10);
}
}
Any help or advice will be greatly appreciated. Thank you.
Have you looked at the camera script in the Unity 2D Platformer?
Your answer
![](https://koobas.hobune.stream/wayback/20220613145159im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How can I make a smooth camera transition over time with java script? 1 Answer
Need help for camera view like Air Strike 3d game ? 1 Answer
Is there any way to keep game object withing the limit of Camera FOV 3 Answers
2D camera switch 1 Answer
How to make camera position relative to a specific target. 1 Answer