tilt controls speed up
its probably an easy question but i need to make this code run so the tilt controls make my object move faster , probably like 3x faster
public class playertilt : MonoBehaviour {
int speed = 5;
Rigidbody rb;
// Use this for initialization
void Start ()
{
rb = GetComponent<Rigidbody>();
}
// Update is called once per frame
void Update ()
{
rb.AddForce(-Input.acceleration.x, 0, -Input.acceleration.z);
}
}
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612053254im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Unity 5 Each Platform Support 1 Answer
Does using extra scenes use more memory? 1 Answer
Specific sounds not working on IOS 0 Answers
Android/Apple native plugin for touch input? 0 Answers
Can I export xcode project in unity? 0 Answers