Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Accelerometer not working in WP

Discussion in 'Scripting' started by noatom, Apr 18, 2014.

  1. noatom

    noatom

    Joined:
    Apr 9, 2014
    Posts:
    21
    So, I have:

    Code (csharp):
    1.  void FixedUpdate(){
    2.  float x = Input.acceleration.x;
    3.         float y = -Input.acceleration.z;
    4. }
    btu every time x and y are 0. Why?
     
  2. noatom

    noatom

    Joined:
    Apr 9, 2014
    Posts:
    21
    fixed by setting the accelerometer to 100 hz