Hello! Well, this is my first post here, and as I feel, not the last.
Right now, I am trying to get a basic hang of Unity. I tried a few times, and gave up, and returned when I had more energy for it. I always started various vehicle projects, as they seem easiest to learn the very basics with.
I followed this tutorial: http://www.gotow.net/andrew/blog/?page_id=78 and it gave some results. Some things were simply not explained though, assuming that the user already has the basic language/scripting knowledge. I dont have the first of the two, but, I’ve read references and followed his general method. I created a code or two, trying to keep it very simple, so that it doesnt quickly turn into spaghetti which I wont want to wade through. Right now I have two scripts, one for steering, applied to front wheels, one for torque, applied in the back.
//Steering:
var turningvalue = 10;
function Update () {
collider.steerAngle = Input.GetAxis("Horizontal") * turningvalue;
}
//Motor:
var addspeed = 1;
function Update() {
collider.motorTorque += Input.GetAxis("Vertical") * addspeed;
}
I pasted both, because both seem to be problematic. The steering one is an issue because the test car seems to be making a turn on its own, whereas I ensured that everything is perfectly symetrical. The motor script appears to run the car even without an input, but given some button holding, the car will still change the forward/back direction.
I’ll keep trying even as I wait for any help. Thank you in advance.