Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Zeeness · Sep 02, 2018 at 11:33 AM · buttonplayer movementuser interfacebutton trigger eventsdevices

My character takes time to move on certain devices

Hey everyone, i have a problem with my character "Cube", so in my first device(HTC One M7), the cube is moving instantly when i press the UI button, but in my second device (Google Pixel 2) the cube doesn't react in time, and that means the cube takes time to respond to move, it's like 0.5 second and it's really unplayable. here is my script

 using UnityEngine;
 using UnityStandardAssets.CrossPlatformInput;    
 
 public class PlayerController : MonoBehaviour
 {    
     public Rigidbody rb;
     float directionX;
 
     public float forwardForce = 2000f;
     public float sidewardForce = 1000f;
 
     private void Start()
     {
         rb = GetComponent<Rigidbody> ();
     }
     void Update()
     {
         directionX = CrossPlatformInputManager.GetAxis ("Horizontal");
     }
 
     // Update is called once per frame
     void FixedUpdate()
     {
         rb.AddForce(0, 0, forwardForce * Time.deltaTime);
 
         if (Input.GetKey("d"))
         {
             rb.AddForce(sidewardForce * Time.deltaTime, 0, 0);
         }
         if (Input.GetKey("a"))
         {
             rb.AddForce(-sidewardForce * Time.deltaTime, 0, 0);
         }
         {
             rb.AddForce (directionX * sidewardForce, 0, 0);
         }
     }
 }




Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Zeeness · Sep 02, 2018 at 12:10 PM

Well, i fixed my problem, i just turned off the magnification with triple-tap on my device. i will let my post up so if anyone gets the same problem.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Pinkuboxu · Sep 03, 2018 at 03:42 AM 1
Share

Good that you found it. If you think it should normally work with magnification on, then you may be good posting it as a Unity bug. I don't have a way to test this out but it sounds like a phone feature isn't being treated correctly by the Unity Engine in that device case.

avatar image Zeeness Pinkuboxu · Sep 03, 2018 at 11:18 AM 0
Share

I didn't think of that to be honest, thanks for the idea, i will post it as a Unity bug, you may be right !

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

106 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Highlight images in buttons children 0 Answers

Play an animation by clicking on a Button from the UI for AR 0 Answers

Activate an OnMouseDown event before clicking a UI button? 1 Answer

Button OnClick() calling wrong function 1 Answer

Use UI buttons with Time.timeScale=0? 3 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges