I’m using the default sidescroller template with a custom character who’s set up almost the same way as the default template character.
It’s rotating to the direction he’s moving (via “Orient rotation to movement” and Rotation Rate Yaw: 720), just like the default does. is perfect for walking, but insufficient for swimming.
The character can swim, in 8 directions via WASD, or 360 via touch.
-
Rotating the mesh on the x axis in the viewport gives me the kind of rotation I expect, but unfortunately,
adjusting the Roll (x?) Rotation Rate under Character Movement (General Settings) doesn’t seem to do anything. -
Adjusting the Rotation Rate for Pitch (y?) makes the character rotate when swimming, but in unexpected directions.
-
Adjusting the Yaw Rotation Rate (z) makes it turn as expected.
Maybe I shouldn’t use these values to rotate the character when he’s swimming?
I found out that projectiles have a “Rotation Follows Velocity” node, but it seems it only takes in a projectile. I’m pretty sure would give me exactly what I want, but I’m not sure how I could modify it to work with a character.
Anyone know how I might get the character’s rotation to follow its velocity? I’ve spent a couple hours trying to get it to work but haven’t really made much progress. A link to an in depth tutorial about character/capsulecomponent rotations would be extremely appreciated!
Thanks