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

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()?