The problem I am facing right now is that sometimes my character will orbit a goal endlessly if the goal is close to the actor like so:
I have a blendspace to drive locomotion that uses only root motion animations:
If I set “Use Fixed Braking Distance For Paths” to true then all is good because the character slows down when it nears the goal which allows the character to turn much more sharply via the blendspace but I don’t want to use a braking distance, in this case I want the character to run at full speed all the way to the goal. Normally though I do want to use a breaking distance. It is just in this once case where I want the character to run at full speed without slowing down before the goal.
What can I do to fix this?
I have tried to turn the braking distance off at runtime via the cpp function ClearFixedBrakingDistance() but it doesn’t seem to work, just no effect at all when executing it at runtime.
If anyone has any suggestions on how to fix this problem it would be greatly appreciated!
Ah I see. I’m not familiar with root motion. Is there anything similar to that you could do? Maybe increase the maximum turn angle in the blendspace? Please forgive me if I’m talking nonsense.
The problem is that with root motion all motion comes from the animation, like if the animation is turning 60 degrees per animation cycle then there is no code or settings to change that since all motion comes from the animation itself. I have an idea to solve this problem though I am going to update this post later if it works
If this helps anybody my solution was to not use the “Use Fixed Braking Distance For Paths” boolean flag in the character movement component and instead code something in blueprints that limits the characters speed until the character is nearly facing the object. Since the speed is limited the root motion blendspace will turn the character sharply which avoids the problem. This is what was happening before:
And this is what happens now:
I also wanted to have the “Fixed Breaking Distance For Path” behavior controllable at runtime so I added blueprint code for that as well so that I can toggle it on and off whenever I wanted.
Here is the blueprint graph I used to control the normalized (0-1) speed of my character