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"

Make an AI move between two points not straight

Hey there.

I looked in many forums but never found a solution.

I made a basic AI move to, where the next target is decided by a "Get Random Reachable Point in radius" in a Find Spot task : alt text

But I need that my AI actor moves in a tangent movement and not straight to the next point. Then I need that this actor when reaching this point and moving to the next point could have a king of latency and not rotate/move immediately in the direction of the next point but make a smooth curve to get in the next point.

I can't find a way to do it!

Product Version: Not Selected
Tags:
more ▼

asked Sep 26 '15 at 07:25 PM in Blueprint Scripting

avatar image

Tomavatars
21 2 3 6

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

1 answer: sort voted first

These should all be separate tasks to be performed in a sequence node within a behavior tree. You'd probably have this sequence of task nodes:

0: Move to position

1: Wait for 2 seconds

2: Rotate orientation to face next node (return to step 0)

more ▼

answered Sep 26 '15 at 09:34 PM

avatar image

Slayemin
824 50 29 73

avatar image Tomavatars Sep 27 '15 at 12:03 PM

Thank you Slayemin but it seems that it is actually not what I want to do. I already done my BT and it works well. But what I want to achieve is like this : alt text

unreal movement.jpg (116.4 kB)
avatar image minnow May 17 '17 at 03:53 PM

Hello, I am wondering about how to curved character like green line... Can you give me a hint? I also try to move my AI from vector location to another vector location. but it's not smooth...

avatar image Slayemin May 17 '17 at 04:43 PM

To move a character on a curve, you have a few options:

1) Create a spline and then move the character along that spline

2) Create a mathematical equation which represents the curvature you're looking for (circles, parabolas, etc). You should be able to sample any point along the X axis and get a corresponding Y value. Note that you can also use parametric equations (ie, the equation of a circle is X = cos(t); Y=sin(t);)

Once you have your function / line figured out, you just do a linear interpolation (lerp) between points. So, if you have a curve section defined by the end points A and B, and you can get any point along that curve with your function, then you should be able to use linear interpolation to move an object along that curve. ie, if you are 50% between A and B, then your lerp would be something like: pos = lerp(0.5, A,B);

avatar image minnow May 19 '17 at 06:49 AM

Thanks Slayemine. That is good idea and good solution! but I am developing ai that has attack and alert move.... I think it is hard to apply your solution. absolutily I'd like to alert move between player and monster... like a this video https://www.youtube.com/watch?v=I2xJgYhHRa4

Very 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