Question by
abraham5361 · Apr 11, 2016 at 02:37 PM ·
force
X is Faster then Z
I have a code that makes the player moves a ball
if (speedx < 5 && Input.acceleration.x > 0) {
rb.AddForce (x * speed);
}
if (speedx > -5 && Input.acceleration.x < 0) {
rb.AddForce (x * speed);
}
if (speedz < 5 && Input.acceleration.z > 0) {
rb.AddForce (z * speed);
}
if (speedz > -5 && Input.acceleration.z < 0) {
rb.AddForce (z * speed);
}
the speed value is 1000 x is working normally but z is too fast, i checked the values of z and input.acceleration but they were normal, i tried reducing the value of the speed for z but the problem when the player has to keep holding it for long for it to order to move is there a way to fix without reducing the speed?
PS:- the speed is 1000 for both x and z but z is still faster then x although they both have all same values
Comment
Your answer
Follow this Question
Related Questions
Why isn't AddExplosionForce working? 1 Answer
Continuous force after keypress? 0 Answers
Cricket Ball Physics? 1 Answer
Donkey Kong keg eject 0 Answers