Quantcast
Channel: Answers for "How to make Sprite not Bounce on Collision (2D)"
Viewing all articles
Browse latest Browse all 18

Answer by davidjohn123

0
0
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

Viewing all articles
Browse latest Browse all 18

Latest Images

Trending Articles





Latest Images