Hello ! I’m trying to set a camera on my game but I have a problem, how can I get player position from a script attached to the camera ? or how can I moove the camera from a script attached to the player ?
Please help me…
Thank u ![]()
References!
In the player script write: public CameraScript camera;
In the camera script write: public PlayerScript player;
If you only want the position you can reference they transforms:
In the player script write: public Transform cameraT;
In the camera script write: public Transform playerT;
Also, watch some Youtube tutorials before posting more questions, they are waaaay better general teachers than random forum posts, specially for beginners.