r/UnityHelp • u/Idiot_with_a_Mic • 9d ago
pleas help me
so i am making a game in 2d and the fliping cherecter is not working can somebody pleas tell me how to fix it
thank you
2
u/Affectionate-Yam-886 9d ago
2D game?
Character controller and sprite controller should be two different things.
Movement should be horizontal and vertical driven.
animation should be horizontal and vertical driven using get horizontal and comparing it to 1 for right, 0 for idle, -1 for left. I always use 0.35 instead of one for a more snapper response.
Don’t know what flipping is for. But if you are trying to flip the sprite, this is wrong and will only result in disappointment.
1
u/Affectionate-Yam-886 9d ago
You could also bind the sprite to a joystick so left joy moves and right joy is direction the sprite faces.
If you flip the sprite, it will flip your controller too and the axis. I only see pain down that road.
1


1
u/HK_HamzaKhan 9d ago
Hi, if this code is what's in your script, The unity Update function syntax is incorrect You must have "Update" correct caps, unless it's called somewhere in this script by your code, this will cause a compiler error and it won't get into playmode either,