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"

How do I prevent an AI character from rotating while moving?

I have an AI controlled pawn in a level and I want it to move to a specific location. I'm using "AI Move To" to accomplish this. However, the pawn will always rotate to face the destination that it is moving to. How do I stop the pawn from rotating while it is moving?

Product Version: UE 4.10
more ▼

asked Mar 15 '16 at 04:56 PM in Blueprint Scripting

avatar image

16 5 6 6

avatar image Max974 May 03 '18 at 09:06 AM

Hi guys, I have the same problem as BenDaykin. Actually the controller always take the rotation give by the MoveTo. Can we prevent the controller from having rotations automatically?

(comments are locked)
10|2000 characters needed characters left

3 answers: sort voted first


if you disable "Use controller rotation yaw" but then it won't turn at all and will move side ways to the destination

more ▼

answered Mar 15 '16 at 05:21 PM

avatar image

3 4 3 4

avatar image BenDaykin1 Mar 16 '16 at 02:47 AM

I've got another function that makes the enemy rotate to face the player. What I want to happen is for the enemy to keep facing the player while moving to a destination. AI Move To on its own makes the enemy constantly switch between looking at the player and looking at the new destination, so it jitters about and looks awkward.

(comments are locked)
10|2000 characters needed characters left

Is this a helicopter-like pawn that can strafe while facing the player? Or, is this a humanoid that you would like their head to turn towards the player?

In the case of the floating pawn, you could use a MoveToLocation; it has a strafe option.

Are you using a form of SetFocus with the player as the target?

more ▼

answered Jan 25 '17 at 06:30 PM

avatar image

Zakku Arashi
111 2 7 9

(comments are locked)
10|2000 characters needed characters left

first of all the ai shouldnt just change its position while chasing. the enemies speed should be good enough so that it can catch up to the player. also you can go to project setting and search for Strafe in The AI Portion.

more ▼

answered May 03 '18 at 10:16 AM

avatar image

308 3 5 15

(comments are locked)
10|2000 characters needed characters left
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