i found Solution its late but its working do not use transform.translate or transform. position for player movement . use rigidbody that will work...........
this work for me..
ground = Physics2D.IsTouchingLayers (GetComponent (), plank);
if (Input.GetKeyDown(KeyCode.Escape)) { Application.Quit(); }
float movex = Input.acceleration.x*speed;
if (movex > 0.01f ) {
//transform.Translate(new Vector3(movex,0f,0f));
rb.velocity=new Vector2(movex,rb.velocity.y);
Debug.Log ("movex"+movex);
}
if (movex
Trending Articles
More Pages to Explore .....