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"

Ai move to 30 Meters of an actor.

So I in my game, I have an Ai with pawn sensing. The Move to actor node works fine but I was wondering if there was a way for me to move my ai towards an actor, but it can’t go inside 30 meters of the actor. How would I do this? Is this possible? Thanks1

Product Version: UE 4.20
Tags:
more ▼

asked Nov 23 '18 at 09:49 PM in Blueprint Scripting

avatar image

CODE REDBALLG
115 2 7 17

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

1 answer: sort voted first

the simplest thing to do would just be to make the acceptance radius 3000 then the ai will stop at that distance from the player. that will not however keep them at that distance if the player move toward them.

more ▼

answered Nov 24 '18 at 02:31 AM

avatar image

ThompsonN13
10.1k 33 10 25

avatar image CODE REDBALLG Nov 24 '18 at 02:52 AM

Ok thanks that helps. But for the future, I’m wondering is there any way to make it where the player moves, they move, or is that too complicated?

avatar image ThompsonN13 Nov 24 '18 at 04:48 AM

if you want the ai to move to the player location then use a move to actor. im sure thats not what your meaning to ask but that is what you asked "where the player moves, they move".

if your meaning that you want the ai to constantly maintain a specified distance from the player then you would need to be running a constant check of the distance from the player then adjusting the ai location. that would result in the ai constantly moving so i would go with a range of distance instead say 2500 - 3500.

Heres an example.

alt text

capture.png (373.2 kB)
avatar image CODE REDBALLG Nov 24 '18 at 06:28 PM

Ok Thank you!

(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