Skip to main content

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

Character dont flip

A topic by Endermeister created Jan 23, 2021 Views: 161 Replies: 2
Viewing posts 1 to 2
Submitted (1 edit)

i use the skript what blackthornprod used in the video with dobblejump but the character dont flip

Please help

Submitted

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);

}

}

Submitted

thanks