- Home /
Roll a Ball Tutorial does not work. Help?
I did the Roll a Ball Tutorial (movement) twice (even copied the script they give you) and both times it didn't work. One time it didn't move. The Second time it didn't move except when I hit the down arrow, which makes it fly straight up. Also when I close Unity and then re-open it all my objects are gone. (platform and sphere). I am super confused, also getting really annoyed because this is my second day trying this program and have already found some errors. Can anyone help me? REALLY FRUSTRATED!!!
I'm actually having a similar problem. The only difference is my ball simply won't move. I've tried both the wasd and arrow keys and still nothing. I copied the exact code as well.
Okay, I managed to get my ball to roll so hopefully this helps you as well. In your hierarchy menu, click on "player". In the inspector menu you should see "Player Controller (Script)" near the bottom. Open that and under "speed", if it says 0, change it to 1, then hit play. Hopefully the ball moves for you.
Answer by Dubtoker · Dec 09, 2016 at 05:08 PM
Just a question, are you saving the scene? When you open unity sometimes you must load your scene? Might be that?
Answer by Pyrate144 · May 15, 2017 at 07:16 AM
I'm actually having a similar problem. The only difference is my ball simply won't move. I've tried both the wasd and arrow keys and still nothing. I copied the exact code as well.
Answer by nhugg1040 · Aug 20, 2017 at 04:15 AM
@Pyrate144 If you copied the code from the tutorial, you will notice that the "rb.AddForce(movement * speed);" section of the code is different than the one the instructor creates because the speed portion is added on later in the video. You need to change the speed by clicking on the 'Player' object and go down to the 'Player Controller (Script)' section. The speed defaults at 0. Change the speed and rerun your game. It should work now.
I am not even getting the Player Controller (Script) section to include speed or something... help