Home > Back-end >  Unity localScale problem with character stuck in wall
Unity localScale problem with character stuck in wall

Time:10-31

I recently downloaded unity, and I found that the localScale method was a better option for flip a character(especially for the box collider). But when I go close to a wall and turn, my character get stuck in wall. Do enter image description here

It's easy to solve once you understand the 'base' by which the scale is flipped. No. 1 and 2 of the uploaded image show the x scale value of 1 and -1 when the reference axis is in the center. Numbers 3 and 4 are when the reference axis is moved to the (0, 0.5) position of the image center using the sprite editor, and the x scale value is set to 1, -1 in the same way.

CodePudding user response:

I thank you for giving to me the solution to my problem.

  • Related