Hi all, Sorry if this is a duplicate issue but I couldn’t see it anywhere.
I have an issue where I load a level, the ball is attached nicely to my paddle but if I leave it there for 5-10 seconds (either stationary or moving with the mouse), my Lose screen suddenly loads.
It seems that my lose collider is being triggered by something after a period of time, as if something invisible is falling very slowly under gravity from the top of the screen or something. I added the following line of code to print collision detail to the console :
using UnityEngine.SceneManagement;
public class LoseCollider : MonoBehaviour {
private void OnTriggerEnter2D(Collider2D collision)
{
Debug.Log("LoseCollider Has been Struck by " + collision.name);
SceneManager.LoadScene("Lose Screen");
}
}
and the console then tells me it is the ball!
How can that be? My ball is still sat right there on top of my paddle?