How do I go about instantly flipping or rotating a character on pressing a direction on keyboard/controller in my 3d sidescroller? I’m trying to tie it to a “facing left” variable which gets set by my input axis, seen here:
I assume this should be setting the variable correctly, but what I can’t figure out next is how to either flip or rotate it(haven’t decided which yet) to face left or right. I’ve tried “SetActorTransform” and “SetActorRotate” at the end of a simple get variable->branch setup, but I feel like I’m missing a step.
Have you tried setting the “Orient Rotation To Movement” boolean in the CharacterMovement component? Setting that to true should automatically rotate the character into the direction of the input. You can then use the rotation rate to increase or decrease the speed of the rotation (since you are making a sidescroller, you only need to set the Z value). If you simply want to flip the character, set the rotation rate value really high.