Hello, I’m using the car demo as a reference to create a racing game of my own. I figured out how to stop the car after the finish line by using the below javascript code
var carIsFinished : boolean = false;
function Start()
{
carIsFinished = false;
}
function Update()
{ var hit : WheelHit;
if(myWC.GetGroundHit(hit)) { if(hit.collider.gameObject.tag == "finish") { carIsFinished = true; }}
if(carIsFinished == false)
{
GetInput();
}
}
COuld someone convert this into c# code?