Home > database >  2D sprite rotation
2D sprite rotation

Time:10-14

I am making a unity game using C# but I want to know how to rotate the player. My 2D sprite falls over a lot but I want to fix it.

This is the code I tried:

transform.rotation *= Quaternion.Euler(0, 0, 0);

CodePudding user response:

Perhaps you want to lock rotation of the attached rigid body? That's a setting in the inspector.

  • Related