Need Help with Animal Locomotion Turning & Speed Control in Unreal Engine

Hey everyone!

I’m pretty new to Unreal Engine, and I’m working on creating a smooth turning system and “turn in place” functionality for animal movement in my project. I’d love some feedback to see if my approach is on the right track because it’s not as smooth as I’d like it to be.

Here’s what I’m trying to achieve:

Dynamic Speed Adjustment: I want the movement capsule to slow down dynamically based on the turning angle.

Adaptive Animation Speed: I’d like the animation playback rate to adjust based on the movement capsule’s speed (though I haven’t scripted this part yet).

Here’s my setup so far in the Character Blueprint:

I created a custom rotator, Movement Rotation Target, to control the character’s rotation based on the Forward and Right Vectors.

Using an RInterp To node, I’m blending the capsule’s rotation smoothly toward the control rotation (where the controller is facing).

Then, I calculate the desired rotation angle with my Movement Rotation Target, finding the yaw difference between Get Actor Rotation and the target rotation using Delta Rotator, then extracting the yaw with Break Rotator.

To control movement speed based on the turning angle:

I used the Map Range Clamped node to link this yaw difference to the Max Walk Speed (set to 840 for normal movement) and a slower Turn in Place Speed (20).

Finally, I used the output from Map Range Clamped to dynamically set the character’s Max Walk Speed based on the turning angle.

As a beginner, I’d love any advice or suggestions on how to improve this setup! I’m especially interested in making it feel smoother, and it’s been challenging finding tutorials specifically for an animal-based controller.

Thanks so much for taking the time to read and help! :blush:

Hi and welcome to the community.

Might I ask which course this relates to?

Basically you need a Blendspace to set up the animations and then there are a few calls you can use that deal with rotation.

1 Like

Hi Brian,

Thanks for your helpful response! :blush: I also wanted to apologise for any confusion, as my question didn’t directly relate to a GameDev.TV course. I’ve been following a few courses on Udemy, but Ryan Laley’s tutorials have influenced the movement rotation blueprints I’m using (leans and turning circles). I haven’t set up the turn-in-place mechanic yet, so I’ll definitely try out your suggestion to use a Blendspace.

Would you recommend any courses on this platform to help me better understand these mechanics? I’d love to strengthen my foundation in this area.

Thanks again for all your help! :blush:

All the best,

Emma

The tutorials I have followed if they are helpful:

    • ground locomotion and rotation setup

https://youtu.be/IeYi0JigobY?feature=shared

  1. custom rotator set-up

https://youtu.be/QWYWs3m8NoI?feature=shared

Hi Emma,
It really depends on what you are doing. Is it an animal that you are controlling or AI Controlled? Control mechanisms are covered in a few courses but for animal AI, there is a small section in the new survival course that covers the mechanics for a Tiger that attacks you.

At the moment there’s a black Friday bundle for blueprint courses which may include this course but also a few others you may find interesting.

Fab is however causing serious issues because some assets are missing and others don’t behave the same way. Never the less, for all courses we have a community discord and TAs on hand to support you and keep you moving through the courses (I support 2 of the Blueprint courses including the survival course)

Anyway, I hope this helps.

Brian

1 Like

Hi Brian,

Thank you so much for all the advice! I’m looking for an animal controlled directly by the player, so realising that might be a bit different from the focus of most of the courses. Still, the section on the tiger in the survival course sounds like it could be really helpful, and I’ll definitely have a look into the Black Friday bundle - it sounds like a great deal, especially with the community support and TA help available :blush:.

Thanks again for all your help!

Emma

1 Like

It’s honestly not that difficult. A while back I set up a simple low-poly cat that was available on the marketplace - not sure if it is still available. Anywya, I think the whole process took less than 10 minutes. Basically the X axis in the blend space 2d controls the rotation and Y is movement speed.
Once you’ve seen it set up you’ll be all like wow…that simple :smiley:

1 Like

Privacy & Terms