- Home /
this works for moving, but after i move either left or right it starts slowly moving me in the opposite direction, why?
private void FixedUpdate()
{
if (Input.GetKey(KeyCode.A))
{
transform.Translate(Vector3.left * Time.deltaTime * speed, Space.Self);
}
if (Input.GetKey(KeyCode.D))
{
transform.Translate(Vector3.right * Time.deltaTime * speed, Space.Self);
}
Comment