If the Raycast is facing left you may be able to Add Force in a negative direction if facing right Add force in the positive direction (if your force is 25, left could be 25 multiplied by -1, and if facing right just leave the variable at 25).
Also from previously in this post I'm not sure if something like this would work for you but I did a little test. I don't like to use raycasting because its expensive but then again probably not these days lol
Because your game is 2.5D Im not sure how directions will work?
I created a player (basic cube) with 2 child objects (a sphere and a empty object named distance, more on these in a minute). Add an FSM to the player gameObject:
Start State:
Get Button Down (Send Event "Punch"),
Get Axis "Horizontal", Store "xPos", check Every Frame
Translate X "xPos" (this is just for testing).
Punch State:
Move Object, Object To Move "Sphere", Destination "Distance" (you can move this object forward in the X to where you want the end point of your punch), Finished Event "Finished"
Next State:
Wait: Time "0.1", Finished Event "Finished"
Next State:
Wait: Time "1", Move Object, Object To Move "Sphere", Destination Player, Finished Event Finished.
Thats it for the Player (it has a Rigidbody, Box Collider nothing fancy). So when you hit the Fire 1 button the cube throws a punch.
The last GameObject is the Enemy:
Basic Cube, with a Box Collider and Rigidbody "I used constraints to Freeze Position Z, Freeze Rotation Y, Z" in the inspector of the rigidbody. Ok add an FSM to the Enemy:
Start State:
Collision Event, Collider Tag "Sphere" (also add a "Sphere" tag on the sphere), Send Event "Hit" (You can store the collider and force if you like?), Get Collision Info, Contact Point "contactPoint" variable
Next State:
Add Force, At Position "contactPoint", Vector X "5", Space "World", Force Mode "Impulse", Add a Finished State that goes back to the start state.
And that's it hope you under stand all of this (after each comma I put the action you will need). The cube can move left and right with the arrow Keys or A & D, if you click the Left Mouse button the player shoots a sphere that goes out to the distance of the Distance object, then returns in 0.1 seconds (you can turn off the Mesh Renderer setting to hide this. Each time you are close enough to hit the Enemy it gets knocked back.
Im sure there are more ways to do this and this may or may not work for your situation but its an idea (you can quickly try in a new empty scene with a cube as the ground) as another option.