After time with no Actions or...duna Y Fail collision happens

Hello Everyone. Thanks for helping
Not sure why I am having this problem.
When I am on playmode in Unity (it’s about Paddle motion) I am having GameOver screen. but nothing hits collision!
it happens when I do noting.
it happens when I am actively moving…

Every time.
Of course I think it’s about Collision (only one Script is pushing GameOver Screen)
But script seems to be correct

private void OnTriggerEnter2D(Collider2D collision){
SceneManager.LoadScene(sceneName: “Success”);
}
and properly attached to the Object. “is trigger” chosen.

help
Thank you for helping

Hi Andrei,

Welcome to our community! :slight_smile:

Is this the Block Breaker project from our archived course? If so, I’m afraid we do not support the content anymore. I’m vaguely remembering the project, though.

That might well be the case. Comment out the line with LoadScene. Log the name of the other game object (the one that is attached to collision) into your console. That’ll help you analyse the problem further.

Also check all your game objects. Maybe the wrong one has got the Collision script attached.

Last but not least, disable the Rigidbody2D on the ball. Enable it when you launch the ball. Look for the enabled property in the Unity API.

I hope this helped. If not, please feel free to ask our helpful community of students over on our Discord chat server. :slight_smile:


See also:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms