I have a distance check which returns me the current distance between each player but am struggling to think of how to write the code to move the players apart.
In fighting games usually such moves are allowed to execute when distance between fighters falls into some predefined range, otherwise move won’t start. For instance it will just play fail animation or even do nothing if you try to execute grapple while being away from opponent. And if the animation requires exatct distance, then bot player are moved toward required distance using linear interpolation during few first frames of animation. In unity there’s Vector3.Lerp to interpolate vectors.
Hey thanks for the responses, yeah i’m ray casting to figure out the executable distance, they just need to move a little bit back in case the move is executed at too close of a range.
I’ve figured it out by getting the current Vector3 of the character executing the move comparing it with the other and lerping it back like you said