This question was
closed Dec 19, 2017 at 04:08 PM by
dNazarik for the following reason:
Problem is not reproducible or outdated
Problem with Android platform
I have a sphere. I use next script for it moving:
moveHor = Input.GetAxis("Horizontal");
movVert = Input.GetAxis("Vertical");
moving = new Vector3(moveHor*3, 0, movVert);
if (rb.velocity.z <= p_MaxSpeed)
{
rb.AddForce(moving * speed);
}
It works good. But if i use next code for Android device:
dir.x = Input.acceleration.x;
if (dir.sqrMagnitude > 1)
dir.Normalize();
dir *= Time.deltaTime;
transform.Translate(dir * speed*3);
i have next problem: if i hit with some collider, sphere starts to behave strangely. Moves in spurts. When you try to turn the Android device sphere the scope of a strong spurt and falls through the texture.. what i have to do for fix it?
Comment