Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

This could be because your character sprite is not the same scale. Try this psuedo code instead.

void Flip(){


if(YourInput == TheInput || YourOtherInput == TheOtherInput etc){

transform.localScale = new Vector2(transform.localScale.x = -transform.localScale.x,  transform.localScale.y);

}


else if(Your2ndInput == The2ndInput || YourOther2ndInput == TheOther2ndInput etc){

transform.localScale = new Vector2(Mathf.Abs(transform.Localscale.x), transform.localScale.y);

}

}

thanks