Question by
kitkat1101 · Apr 22, 2017 at 06:20 AM ·
player movement
Error CS0029
I just started attempting to code tonight but I keep getting this error and I can't seem to get it fixed, help?
Code: public class PlayerController : MonoBehaviour {
private Ridgidbody rb;
void Start()
{
rb = GetComponent<Rigidbody>();
}
void FixedUpdate()
{
float moveHorizontal = Input.GetAxis("Horizontal");
float moveVertical = Input.GetAxis("Vertical");
Vector3 movement = new Vector3(moveHorizontal, 0.0f, moveVertical);
rb.AddForce(movement);
}
private class Ridgidbody
{
internal void AddForce(Vector3 movement)
{
throw new NotImplementedException();
}
}
}
Comment
Answer by hexagonius · Apr 25, 2017 at 09:44 AM
You misspelled Ridgidbody. And you don't need that internal class.