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?
Code (csharp): void FixedUpdate(){ transform.Translate(movementVector * direction); } void OnCollisionEnter(){ direction *= -1; } Something liek that?