- Home /
Ball is not Rolling
I followed an old tutorial on how to make a ball rolling game. Mine is not working and it says there is a problem with the rigidbody line. Thanks.
#pragma strict
var rotationSpeed = 100;
function Update ()
{
var rotation : float = Input.GetAxis ("Horizontal") * rotationSpeed;
rotation *= Time.deltaTime;
rigidbody.AddRelativeTorque (Vector3.back * rotation);
}
Comment
Your answer
Follow this Question
Related Questions
Bouncing ball tutorial - Ball goes through the floor. 2 Answers
Player's collider stuck with wall collider when move button pressed even not grounded.. 1 Answer
How do i make local velocity?,How do i make velocity move the player the way the object is facing? 1 Answer
Following the Unity 'Roll-a-Ball' tutorial but ball won't move 1 Answer