I’m trying to have my character move forward whenever he attacks. So far he successfully moves forward, but if there’s something in front of him he goes through it. Any way to avoid this? I turn PushUp on when I need him to move forward, and Push() stops it after 0.5 seconds.
if(PushUp){
Push();
transform.Translate(0,0,5 * Time.deltaTime);
}