Search Unity

Object is moving slower on other device (Android)

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

  1. PanaitStudio

    PanaitStudio

    Joined:
    Oct 29, 2014
    Posts:
    9
    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;
    3.  
    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. }
    20.  
    That's, for example, the code for the down button. Can someone please help me? Should I use FixedUpdate()?