- Home /
Camera Goes white when moving with player,
I made a script for my camera for following the player.When I play the game, game view goes white, even if on scene view all is fine When I disable the script everything is fine.If i try to move camera by Vector3.right() it goes fine.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class FollowPlayer : MonoBehaviour
{
public Transform player;
public Vector3 playerpos;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
playerpos.x = player.position.x;
transform.position = playerpos;
}
}
,
Answer by Artik2442 · Jul 11, 2020 at 09:45 AM
It is maybe because your camera is in your player and the player is white for FPS, am I right?
If yes, there is some solutions:
1) Adjust your Main Camera near clipping planes (increase it).
2) Disable the Mesh Renderer of your player (but the player become invisible)
If it works this is the explanation:
Your player is moving, and your camera is following the player, but, the camera follow the player a little bit late... So the white screen you see is the white material of the player!
It's possible that it is not the solution, but it is something that happened to me when I was doing a FPS.
Your answer
![](https://koobas.hobune.stream/wayback/20220613002834im_/https://answers.unity.com/themes/thub/images/avi.jpg)