Flying Example Keep Physics State For Flying Collision

Can I keep my physics state while colliding with something? Like say if I hit a wall have it kill my forward velocity but any other velocity like sideways velocity keep it?