- Home /
Question by
kane-david · Oct 31, 2017 at 09:00 PM ·
scripting problemphysics2dbouncing
Bouncing problem
I had a problem while controlling bouncing object it moves normally (i'm controlling it using WASD) , but if it hits a wall or another object it moves to the opposite direction but if i pressed the the previous one the object keeps fighting against the control for example if it hits and moves to the left and i wanted to move it right it stuck in the middle and start vibrating and if i released the key it continues to move to the left ,that's my code for movement
Vector2 mov = new Vector2(Input.GetAxisRaw("Horizontal"), Input.GetAxisRaw("Vertical")); transform.Translate ( mov *speed* Time.deltaTime);
what should i change here to fix that?
Comment