Good evening gusy (europe)
I’m prerry new with unity3d and I already have some problems with my camera… I want my camera like in the old Pokémon games. It follows the player from the top but without rotation. But when I child it to my player it follows him directly with rotaiton. I would really apreciatre it, if someone could create a little little C# script for me. PS: Im a bloody beginner in programming and searching a solution for hours…
public class CameraFollow : MonoBehaviour {
public GameObject player;
public float cameraHeight = 20.0f;
void Update() {
Vector3 pos = player.transform.position;
pos.z += cameraHeight;
transform.position = pos;
}
}
Attach the script to the camera, then drag-drop player gameobject to -GameObject player- field in editor.