[UPDATE] If you are looking for the breaking bugfix check the description after expanding it!
Let’s learn how to create a car controller in Unity. We will get to know Unity’s wheel collider component and use it to move a car. We will also create a simple camera script that will follow the car.
[BREAKING BUGFIX!!]
There is a bug in the HandleMotor() method in the CarController.cs. The "if (isBreaking) check should be removed. The fix is also pushed to the GitHub repository. The method should look like that:
private void HandleMotor()
{
frontLeftWheelCollider.motorTorque = verticalInput * motorForce;
frontRightWheelCollider.motorTorque = verticalInput * motorForce;
currentbreakForce = isBreaking ? breakForce : 0f;
ApplyBreaking();
}
Used assets:
ARCADE: FREE Racing Car
https://assetstore.unity.com/packages...
by: iMENA Games
https://assetstore.unity.com/publishe...
Grab the whole project from GitHub:
https://github.com/GameDevChef/CarCon...
Nesta página do site você pode assistir ao vídeo on-line Simple Car Controller in Unity Tutorial duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário GameDevChef 09 Junho 2020, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 344,408 vezes e gostou 6.4 mil espectadores. Boa visualização!