I wrote a script so that the character can dash in the direction of where the mouse is. The problem is that the angle is completely wrong.
Here’s the important part of the code:
MouseAngleVec = new Vector2(Input.mousePosition.x, Input.mousePosition.y);
DiffVec = new Vector2(this.gameObject.transform.position.x, this.gameObject.transform.position.y) - MouseAngleVec;
DiffVec = DiffVec.normalized;
RB.AddForce(DiffVec * DashSpeed, ForceMode2D.Impulse);