Character Facing Direction Snap

ACharacter will automatically handle the rotation of your character based on input (velocity or otherwise) if you have the correct bool set to true.

The way I believe it works (please correct me if I’m wrong) is that it lerps the rotation of the mesh component, and the actual root capsule rotation stays the same.

For a sidescroller, this is not really what I want, because I have certain abilities that I use the mesh rotation for (the facing direction is really what I care about). Is there a way that I can “snap” my character’s orientation to be either left or right instead of lerping?

Thanks,
R

CharacterMovement->RotationRate

Set it to a big value, like FRotator(0.0f, 1000.0f, 0.0f). It should work, but it’s more of a hack than a real solution. Though i don’t think there’s any other ways to achieve it without writing custom movement component.

I thought that might work too, but even going with a huge number like 5000 doesn’t quite do it, there’s always the edge case where the character is slightly off-plane.

I was hoping for a simple solution, but I’m happy to dig into the movement component to make the change.

-R

I believe that setting rotates the root, not just the mesh. You could always turn it off and set the pawn rotation yourself!

@JamesG - that seems to be the simplest way to go. It sort of brings up a slightly off-topic question, though; Is there any way to select components in play or simulate mode? I’d like top be able to easily see my Mesh’s rotation vs the capsule’s vs the roots at runtime to test this sort of thing.