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"

Set Focus - AI looking down

Hi all. Does anyone know why AI controlled character is looking down at the base of a pawn set to be the focus via 'set focus' node? I can't seem to find a way to control the aiming of the AI characters

Product Version: UE 4.18
Tags:
more ▼

asked Dec 03 '17 at 08:40 PM in Blueprint Scripting

avatar image

Dante6686
16 1 4

avatar image inedible.red Feb 08 '19 at 02:28 PM

Did you ever find out ?

avatar image Dante6686 Feb 08 '19 at 05:17 PM

No. I've created another actor, a sphere and attached it to player at one of the spine bones and then set the AI focus to that sphere actor instead of player. Best I could think of

avatar image inedible.red Feb 08 '19 at 09:01 PM

I was trying a similar thing but somehow my characters head rotate in a single axis (horizontal) and I'm not sure why. Do you have full control that way ? Here is my situation btw : https://m.imgur.com/account/inediblered/images/NZWD6UU

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

1 answer: sort voted first

SetFocus probably sets the focus point to the pivot (root) of the target actor.

You can use SetFocalPoint to manually set the exact location the AI should look at. You could get the world location of a bone or specific component and set the focal point with this position.

more ▼

answered Feb 11 '19 at 01:34 PM

avatar image

SenseiHaketon
181 4 4 7

avatar image Dante6686 Feb 11 '19 at 01:54 PM

Yes, it seems to focus on a pivot which, for the capsule or the character will be at the bottom. As far as I remember SetFocalPoint is one time event, as in: it snaps to where you want but as soon as you move it doesn't follow that point as it does when you use SetFocus

avatar image SenseiHaketon Feb 11 '19 at 01:59 PM

The solution you provided above works fine. You could also execute SetFocalPoint in your Event Tick.

avatar image Dante6686 Feb 11 '19 at 02:05 PM

Yeah, I guess you could do SetFocalPoint on tick if it doesn't impact the performance

avatar image SenseiHaketon Feb 11 '19 at 02:13 PM

I guess SetFocus does the same thing internally.

(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