x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

How to achieve smooth rotation using Navmesh? (actor keeps snapping towards direction)

I currently have AI enemy characters setup to follow the player, however their rotation seems to keep snapping towards the player and it looks awful and broken. I've tried turning on/off enable strafing, have tried desired rotation/orient rotation to movement, with the rotation rate set to 5, but it still consistently snaps towards the rotation instead of smoothly turning. Is there an option elsewhere outside the character I've missed?

I'd greatly appreciate a response as the way it rotates now looks like a rushed and broken system and I wouldn't want to release a game like this.

Product Version: Not Selected
Tags:
more ▼

asked Jul 29 '14 at 05:23 PM in Using UE4

avatar image

SwiftIllusion
247 23 31 34

avatar image gamesmyth27 Aug 30 '17 at 06:49 PM

Or "RInterp To" node where the target is the players position and the node includes time and rotation speed.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

3 answers: sort voted first

Hi SwiftIllusion,

Go to your AI Pawn and under Components > CharacterMovement > Enable "Orient Rotation to Movement"

Then under Defaults > Pawn > Disable "Use Controller Rotation Yaw" & Under Character Movement > set "Yaw" to a value you like (for example 180).

I hope that helps.

Thanks, TJ

more ▼

answered Jul 29 '14 at 06:27 PM

avatar image

TJ V ♦♦ STAFF
41.1k 1009 183 493

avatar image SwiftIllusion Jul 29 '14 at 11:30 PM

Thank you very much :D, the "Use Controller Rotation Yaw" was the option I had missed to turn off that fixed it :)!

avatar image mitjaprelovsek Sep 20 '17 at 08:13 AM

From my experience, this does achieve slow rotation of the meshes inside moving actor towards the final rotation, but the direction of the actor's root movement (the forward vector) is still changing instantaneously.

Say you've got 3 target points (or a baseball field for that matter) in NavMesh and you want the actor to run from one to the next. My question is, is it possible to achieve a trajectory similar to a real baseball player, who would run in a smooth trajectory, even if it's a bit longer, and not running to 1st base, turning in an instant and run towards the second and so forth?

Thanks!

avatar image georgeperry3 Oct 11 '18 at 07:44 AM

Thanks TJ worked amazingly.

avatar image johnskyrim Mar 01 '19 at 04:13 AM

Just wanted to say thanks to SwiftIllusion, this was exactly what I was looking for!

avatar image PingouinGames Jun 07 '19 at 10:20 PM

Thanks a lot ! "Use Controller Rotation Yaw" was the option I had missed to turn off

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

I had the same problem , but when I tried it on two different computers with one being the host and the other the client , it worked perfect , everything was smooth. But if I tried to launch 2 clients on the same computer , the rotation wasnt smooth. :)

more ▼

answered Nov 27 '17 at 05:43 PM

avatar image

urreek
0 1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

This doesnt work at all. The "Orient rotation to movement" and so fort do absolutely nothing to the rotation smoothness. Is something changed in latest versions of UE?????

more ▼

answered Aug 27 '17 at 03:45 PM

avatar image

amstradcpcuser
31 4 9 13

avatar image Omar Vector Aug 30 '17 at 11:25 AM

enabling Orient rotation to movement only not going to work u must go to your AI Pawn Class default, and do as he said : "Then under Defaults > Pawn > Disable "Use Controller Rotation Yaw" & Under Character Movement > set "Yaw" to a value you like (for example 180)."

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question