- Home /
CS0120 error
Hi guys. I'm new to unity and was trying to make a roll a a ball game just to try and get some basic understanding of the program. I have been watching a tutorial on how to make the game and have followed the instructions as closely as i can but still cant manage to get the first lot of coding quite right for some reason. i think its something to do with the "player controller" at the to. this is the coding i have so far
using UnityEngine; using System.Collections;
public class PlayerController: MonoBehaviour {
void FixedUpdate () { float moveHorizontal = Input.GetAxis("Horizontal"); float moveVertical = Input.GetAxis("Vertical");
Vector3 movement =new Vector3 (moveHorizontal, 0.0f, moveVertical);
Rigidbody.AddForce(movement*10.0f);
}
}
Please format your code to make it easier to read, and if you post an error always include the line# the compiler displays in the console area associated to the error.
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
Adding custom trees in UnityTerrain. 1 Answer
Beginner Help with Unity 1 Answer
Is it possible to make 3D model 2 Answers
How to get an NPC to wander around 3 Answers