SeidaBraica
New Member
I'm new in Unity. I want to do that wheels (cylinders) in this car will turn around if I press "up" button on my keyboard.This is the code I've written:\[code\]var forwardSpeed: float = 3;function Start () {}function Update () { var forwardMoveAmount = Input.GetAxis("Vertical")*forwardSpeed; transform.Rotate(0, forwardMoveAmount, 0);}\[/code\]OK. Wheels are turning around, but my car is still at the same place. What should I do to move this car?
PS: can you explain me, why this cylinder rotates correctly, when I use Y axis? It should be z.