How can I define Android or iOS inputs?

instead of
Input.GetAxis(“Vertical”)*moveVec; what should I use for android?
and also for
Input.GetAxis(“Horizontal”) please let me know.

I want to use a simple touch on screen for moving forward.
and also want to use mobile’s motion to turn left and right.

If any better option then this, then also please let me know.

Thanks in advance.

You have to either calculate touch offsets using a delta position or use an onscreen joystick. You also have to catch the device’s acelorometer or gyro to detect turning motion.
Here is a pretty good example for detecting touch.

I have got the solution for my game, i am using this code to move forward when touched the screen and stop when released the screen.



 transform = moveVector * Input.touchCount;




 transform = moveVector * 0;


Thanx for replying and giving me an idea.

If you want your car to move according to device tilt, use this

FrontLeftWheel.steerAngle = 20 * Input.acceleration.y; /* you can use any number instead of 20 for sensitivity. FrontLeftwheel is the wheel collider attached to front wheels. .y is for landscape orientation.
FrontRightWheel.steerAngle = 20 * Input.acceleration.y;