Hey there
I’m trying to make the camera scroll upwards continuously in my 2d shooter but I’m getting a blank image in the ‘Game’ window.
What’s weird is that the camera appears to scroll correctly in the ‘Scene’ window i.e. the white rectangle moves up my background, it’s just that I’m not getting a feed, and this happens for the entirety of the runtime process.
Here’s how I scroll the camera:
public float scrollSpeed = 5;
void Update()
{
float bkHalfWidth = transform.position.x;
float bkHalfHeight = transform.position.y;
transform.position = new Vector3(bkHalfWidth, scrollSpeed * Time.deltaTime + bkHalfHeight, 0);
}
^^^This component is connected to the main camera object.
Any feedback would be appreciated