Ball don't stick to paddle but keeps bouncing

Hi guys, Im doing the course now and it’s great so far, thumbs up, learning alot here. I’ve run in to a small problem though. I can’t seem to get the ball to stick to the paddle… I’ve dont the script exactly like Rick did, but insted of sticking from the start, the ball just makes small bounces of the paddle when starting the game. Any idea what could be wrong here?

Best Nicklas

Hi Nicklas,

Have you added the Ball.cs script as a component to the Ball GameObject?

By the way, it’s better to copy/paste your code into your posts on the forum and apply the code formatting characters rather than using screenshots, it’s easier to read, especially on mobile devices and enables those that offer to help you the ability to copy/paste chunks of your code back to you easily with corrections/suggestions. Screenshots are great for error messages or details from the Unity editor though.


See also;

Hi Rob, ahhh that’s it, missed that part :slight_smile: Thank you.

1 Like

You’re very welcome Nicklas.

One tip for you, if you ever have something similar, just pop a Debug.Log statement in to the Start method, if you don’t see the message output to the console you know that the script hasn’t executed, that would probably then lead you to realising the script isn’t attached :slight_smile:

8 posts were split to a new topic: The ball stops when it collides with another object?

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

Privacy & Terms