Potential Bug With Roll a Ball Tutorial: 2 of 8 Moving The Player.

Hello.
Thank you for taking the time to read this. I am entirely new to Unity so I am working with the first tutorial.
I have encountered an issue in the second segment. I copied the code and pasted it into C# script but
when I hit the play button the ball refuses to move.
Is their a problem with the tutorial or have I made a small error somewhere?

You’ve made a small error somewhere.

For example, perhaps you’ve made the script correctly, but failed to actually apply the script to anything. Scripts sitting around in your Asset folder don’t (generally) do anything; you need to actually attach them to an object.

The roll-a-ball tutorial is one of the most widely used and lauded tutorials there is; I’m pretty sure people would have noticed before now if the ball didn’t actually roll. :slight_smile:

1 Like

Also, you will learn more & understand it if you type the code yourself - watching & pausing the video as you go - than you will if you copy & paste what unity give you.

Oh yeah. Remember the flood with 4.6 when the update broke Roll-a-Ball? Fortunately it doesn’t happen often.

Thank you for the response. The bad news is that I have double checked, and the ball appears to have the script installed so I most likely made an error somewhere else. I do agree with you that someone would have sighted this as a bug already. Could there be another mistake I made? Keep in mind I followed the videos and did exactly what was dictated.

Yes, there are lots of things that you could have done wrong. There could be no Rigidbody on the ball; there could be a Rigidbody set to kinetic, or with too much friction, or way too much mass, or something like that. It could be stuck in something else. You could have attached the script to a prefab in your project, rather than an object in the scene hierarchy. And probably other things I’m not thinking of.

So, check all your object properties carefully against what’s shown in the video. Add Debug.Log statements to the code that should be executing, to verify that it really is. Manually pick the ball up (using the Y property in the inspector) while the game is paused, then unpause it and see if it falls. Etc.

Do you have any errors in the console?