>>551
rb.velicityのところをifで囲んでx!=0&&y!=0ならvector2.zeroにしたらいいと
思うよ。
elseにはrb.velocity=new vector2(rb.velocity.x+x,rb.velocity.y+y)
でいけないかな?