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"

Having Trouble Turning AI in place

I'm trying to make the AI turn to face it's Destination Location before moving forward but for some reason it keeps getting stuck in a looping turning animation with the result of a Find Look At Rotation not making much sense.

If anyone can point me to some examples that would be great. I'm not using the Controller to turn the character, it's set to turn based on movement so using the controller's turn variable or rotation isn't going to help.

Product Version: UE 4.17
more ▼

asked Nov 02 '17 at 02:23 PM in Blueprint Scripting

avatar image

182 21 32 40

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

1 answer: sort voted first
more ▼

answered Nov 02 '17 at 02:58 PM

avatar image

844 9 17 30

avatar image 0vr Nov 02 '17 at 03:03 PM

If i do that, how will I drive the turning animations? Right now I have the turning animations in a blendspace which is driven by a float value for direction. I could make each turn direction a separate state driven by a boolean for is turning right or is turning left but how would i know what direction i'm turning in with that node? Or even if it's done turning?

avatar image Flash7 Nov 02 '17 at 03:19 PM

I believe you can play with DesiredRotation and ControlRotation. You can draw debug line and see how they deviate from each other when you turn. I'm not sure if in your case you want to keep that behavior - it will keep the character facing that direction. BTW, this is how you do strafing.

But, if you want to look once at destination and then walk to it, but do not keep focus, then Set Focus is no help. Probably it is better to find an angle to rotate to (angle between my forward and where my destination is - dot product) and rotate my character to that angle.

(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