Hi all, I m kind of having a starting trouble. I wanted to implement a basic move function for a character using one of the animations. How can I get this done in C#. Nitin
If you already know the C# language, just look at the scripting referance. Im new to, and im focusing more on JvaScript, so Im not sure exactly what to write. For a FPS controller, Unity has a built in JS script to control it in the Standard Assets folder.
Thanx for the reply. But I wanted to implement my code in C# and gettin stuck in the GetComponent. Code (csharp): CharacterController controller = (CharacterController)gameObject.GetComponent(CharacterController); controller.Move(moveDirection * Time.deltaTime); What am I doing wrong?
Code (csharp): CharacterController controller = (CharacterController)gameObject.GetComponent("CharacterController"); controller.Move(moveDirection * Time.deltaTime); You should use either "CharacterController" or typeof(CharacterController), not just CharacterController in the GetComponent parameters.