Question by
chinnaeshwar9 · Jun 15, 2021 at 04:07 AM ·
cameragameobjectprogramming
Camera Issue,Camera is changing it's position in game view.
Camera is changing it's position in game view. Depth is applied and everything is set for camera, but I don't know how to fix it's been a week with this issue. Code for camera: using System. Collections; using System. Collections. Generic; using Unity Engine;
public class Camera : Mono Behavior { public Game Object Player; private Vector3 cam Offset = new Vector3(0, 2, 0);
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
transform .position = Player. transform. position + cam Offset;
}
}
cameraposition-in-scene-view.png
(294.4 kB)
camera-code.png
(38.4 kB)
Comment