force translation

how can I force a movement transform.translate? I have a scene with an enemy that goes back and forth. I used Mathf.pingpong to bring you back. I want to make sure that every time you collide with something Invert its translation but is forced into Update. How can I do?

void FixedUpdate(){
transform.Translate(movementVector * direction);
}

void OnCollisionEnter(){
direction *= -1;
}

Something liek that?

This is what I want to accomplish, I hope you can understand it better