Rolling a ball - Game view problem.

HI!! I’m new to Unity (to game development in general…) and I’m having trouble with the tutorial (http://unity3d.com/learn/tutorials/projects/roll-a-ball). When I try to move the ball, it just stay there. This is the code:

using UnityEngine;
using System.Collections;

public class PlayerController : MonoBehaviour 
{    
    public float speed;

    void FixedUpdate()
    {
        float moveHorizontal = Input.GetAxis("Horizontal");
        float moveVertical = Input.GetAxis("Vertical");
            
        Vector3 movement = new Vector3(moveHorizontal, 0.0f, moveVertical);

        rigidbody.AddForce(movement * speed * Time.deltaTime);
    }
}

How can I solve this problem? Thanks in advance!!!


So, I set the speed to 1000000 (maybe I’ve exaggerated…) and I’ve seen that the ball actually moves (the coordinates of the position and rotation change) but in the window “game” it just stay in the initial position.
Instant of initiation:

[23928-schermata+2014-03-20+alle+12.58.17.png|23928]

Instant in which the ball is supposed to move:

[23930-schermata+2014-03-20+alle+12.58.34.png|23930]


Uhm… Okay I solved the problem!! I just had to press the arrow keys after play :smiley:

You must set the public float “speed” to a certain value in the Inspecter. There should be a field for it under the script component of your gameObject. Try a high value if a low value seems to do nothing.