Hi. I have a question about rotating an object and controlling it with Race n Brake Button. I have been trying to do it by following method. That I think should have been done by now. But it is not working.
if (touch.phase == TouchPhase.Stationary && accelerator.HitTest (touch.position))
{
accelerator.texture = btn_accelerator [1];
accel = 1;
if(GroundCheck.isGrounded)
{
PlayerCar.Rotate(Time.deltaTime * 500, 0 , 0);
}
}
Does Anyone know any better approach?