When the player, the camera and the background start to move, several blue lines appear in front of the platform that I suppose are from the background. The camera has a script to follow the character and the background is children of the camera.
This is the camera script:
// Smooth towards the target
using UnityEngine;
using System.Collections;
public class DampCamera2D : MonoBehaviour
{
public Transform target;
public float smoothTime = 0.3F;
private Vector3 velocity = Vector3.zero;
void Update()
{
// Define a target position above and behind the target transform
Vector3 targetPosition = target.TransformPoint(new Vector3(0, 1, -10));
// Smoothly move the camera towards that target position
transform.position = Vector3.SmoothDamp(transform.position, targetPosition, ref velocity, smoothTime);
}
}
Here is an image, there is only one line but when I move the character a lot more appear:
I hope yo can help me! Thanks in advance.