Modify AI Move To to rotate and move forward
Hello, I want recreate project on UE4 from Unity. In example project character move to point and rotate to move direction. I want it rotate and move only forward direction and not have problem with physics and not stuck on obstacles. Surf goolge and forum did not bring the results.
You have to write your own class
Hope this helps :)
answered Jul 29 '16 at 11:12 AM
Take a loot at the SetFocus/SetFocalPoint function of AI_Controller. This functions specifies at which object does the character looks (or location) when moving. It has different priorities. I think it is what are you looking for and it is far easy.
answered Jul 29 '16 at 12:00 PM
I did it by having my AIController class override UpdateControlRotation to turn slowly towards the next focal point (GetFocalPoint). I then set the character walk/run speed to zero in the character movement settings, and updated the character location manually by something like NewPos = OldPos + (MyMoveSp * DeltaTime * GetActorForwardVector());
As you can imagine, the character didn't stay exactly on the nav path, but it wasn't a big deal in my case. There is no navigation function in Unreal that does exactly what you want (a nav path with tangents that take into account rotation speeds). If you want one, you'd have to write it and hopefully share it with the rest of us :)
In a case such as you showed, Epic would prefer you add a turn around animation that gets the player pointed in the right direction, and then navigate as normal.
answered Aug 01 '16 at 08:40 PM
Simple solution that worked perfectly. From Blueprint Editor
In your Class (first item in your component list, above CapsuleComponent) uncheck "Use Controller Rotation Yaw"
In your CharacterMovement component, check "Orient Rotation to Movement"
answered Feb 11 '19 at 08:27 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here