I’ve been trying to follow the video tutorials for the space shooter project tutorial, and can’t get the code to work right. I’ve been trying to use Input.GetAxis but it says that the UnityEngine.Input directory doesn’t have a GetAxis command. I tried writing this code in place of what the video says, but both just return a whole slew of errors. Can anyone tell me what I’m doing wrong? The video has code but I want to be able to write my own (obviously, to make my own games). I’m fairly new to C# and I’m not really that good at coding in general. If you could use script kiddie language that’d be great.
using UnityEngine;
using System.Collections;
public class PlayerController : MonoBehaviour
{
void FixedUpdate ()
{
Rigidbody rbody = GetComponent();
rbody.velocity = movement * speed;
}
}
perhaps we could start with a sample of the code you are getting errors from, rather than code that doesn’t have anything to do with Input in it (although it does appear to have two undeclared and uninitialised variables… )
We can’t help you with the code you are having issues with if you don’t show us how you are trying to use it; and if you include the errors and use code tags we’ll be off to an even better start.