Hi guys,
I’m try use Mathf.Pow method but maybe I don’t know how it’s realy work…
Let’s go, it’s my debug code:
Debug.Log ("Acceleration Y: " + Input.acceleration.y + " Result: " + Mathf.Pow(Input.acceleration.y, 0) + "\nAccelerationX: " + Input.acceleration.x + " Result: " + Mathf.Pow(Input.acceleration.x , 0));
Ok, it’s will get acceleration value and power of 0, right?
So, assuming than Y value is -0.875, -0.875 to the power of 0 is -1, but the unity return 1! why??
I’m forgetting something ??
Look this real output:
Acceleration Y: -0.2080078 Result: 1
Acceleration X: -0.08300781 Result: 1
Unity return 1 but it’s should be -1.
look this one:
Acceleration Y: 0.01171875 Result: 1
Acceleration X: 0.1259766 Result: 1
This one is right, it’s only work with positive number or I’m crazy?