I want my player to move in diagonal directions and this is the code I am using to move in a down diagonal way:
if (Input.GetAxisRaw("Horizontal") > 0f && Input.GetAxisRaw("Vertical") < 0f)
{
front45 = true;
rb.velocity = new Vector3(moveSpeed, -moveSpeed, 0f);
}
however the rigidbody2d wont move in that direction. It will move up, down and from side to side, but never diagonal.
The front45 = true is just for the animator to know when to change animation.