Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.

    Read our full announcement for more information and let us know if you have any questions.

Object is moving slower on other device (Android)

Discussion in 'Physics' started by PanaitStudio, Jan 21, 2015.

  1. PanaitStudio


    Oct 29, 2014
    Hello everyone, Tudor here,
    I am developing a game. On my phone (Android) the "Cube" is moving normal. But on my tablet it moves a lot slower. Why?
    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    4. public class AndroidControlDown : MonoBehaviour {
    5.     public GameObject Cube;
    6.     private Vector3 input;    //For rigidbody.AddForce
    7.     // Update is called once per frame
    8.     void Update ()
    9.     {
    10.         if(Input.touchCount > 0)
    11.         {
    12.             if(guiTexture.HitTest(Input.GetTouch(0).position))
    13.             {
    14.                 input = new Vector3(0, 0, -55);
    15.                 Cube.rigidbody.AddForce(input);
    16.             }
    17.         }
    18.     }
    19. }
    That's, for example, the code for the down button. Can someone please help me? Should I use FixedUpdate()?