J'ai maintenant fais ce script là :
Code : Tout sélectionner
using UnityEngine;
public class scrolling : MonoBehaviour
{
Transform player;
void Start() {
player = GameObject.FindWithTag("Player").transform;
}
void FixedUpdate(){
float posp = player.position.x;
Vector3 npz = new Vector3 (posp - 2f,1.854f,-5.317f);
transform.position = npz;
}
}