[Solved in 1.25] AI with Script Canvas

I have a script canvas with a On Tick going straight to a FindPathToPosition. I have a Path on the ground below the AI character and when I start the game nothing happens. I have tried multiple times to see if people can help on the forums but for some reason it seems like no one knows anything about the AI for script canvas, at least not enough to get one working on 1.25 . Any help on how to set up a simple AI in Script Canvas would be appreciated. (The Starter Game AI does not count as “Simple” I looked at that and I am just looking for moving a Capsule from one location to another while following a path.)

I agree with you :100:% @WashedUpStudios

:point_right: I tried/tired a lot for AI Navigation Script Canvas LY 1.25, result is nothing :man_facepalming: Someone kill me with this knife :dagger:

:point_right: I does work very easy with AI Navigation Script Canvas LY 1.18 :white_check_mark: :zipper_mouth_face:

You have to add a delay node from the tick to the Find Path node @_AhmadKarami I got it working with the help of Yeshua. Hope this helps you, and before with the tick straight to Find Path node it should never have worked I guess because that was actually a bug and in real scripting it would have needed a pause also.


@WashedUpStudios I reported this bug in time release LY 1.18 & 1.23 & again 12 day ago , but I did not see any reaction from the engine test team! so you accepted this bug , does exist , GOOD , Thank you :pray: :rose: I did not thought Find Path node need to delay node :scream: really I reported a lot bugs, but reactions by test engine team is not good :thinking: :face_with_monocle:


ALSO THIS BUG in LY 1.14 (Date is 15 may 2018 for LY 1.14) [Delay Node]

@WashedUpStudios You can make a video tutorial? or publish script canvas files? or shots/pictures of your work?

Thank you :pray: :rose:

PathFindDelay This is all you need to get an AI going after you, after this you can add more to it, but make sure it is on a rigidbody that is kinematic, or with a character controller if you use PhysX. And for Navigation just use Transform unless you want to get into Physics Based, and I cannot help there due to all of mine being Transform Based. I hope this helps.


Does not work!!! :sob: Thank you @WashedUpStudios @LS1 :rose: :pray: I already tested this graph :flushed: I saw you selected Target param & you set Character Entity inside target param , you used character’s starter game? or you made a your custom character, then you set your character Entity inside target param? :face_with_monocle: :thinking:

I have a custom character, and I use the first entity/parent entity of my whole character. CharacterAsset


DOES WORK , THANK YOU SO MUCH @WashedUpStudios :star_struck: :heart_eyes:

1 Like

No problem I hope this can help other people also that are having this problem. :+1:


This is My Shots :blush: It’s very interesting, the spaceship does not sink into the box and does not pass through it, I like this very much :ballot_box_with_check:

1 Like

@petrocket @LS1 @lmbr_Saulty

this is a bug or Am I wrong :question:

Why Spaceships do not detect collision each other :question:

spaceship does sink into the other spaceship and does pass through each other spaceship ! :thinking: How I can stop this :question:

It is interesting , this is not the case for the box and spaceships do not pass through the box and do not sink into that box!

@lmbr_Saulty @LS1 @petrocket
I Know , I using Transform Bus , so I must select Physics Bus or Custom Bus , But when I select Physics Bus or Custom Bus , then , I see FindPath node , does not work! but for Trasform Bus does work with FindPath node :thinking:

Find path does work with physics, it just cannot do the movement for you, I have not gotten into physics ai yet, and probably won’t due to you having to add a lot more to you graph to tell it to you impulses to get to the location after it found a path. You can use transform and make them collide, but it is also a ton of work, just not as much as using physics as your AI movement choice. I am working on paths right now, but within a week or so I should be working on AI collisions.

1 Like

If you are looking to do movement with physics you want to use the “Try Relative Move” node.

1 Like

That node is used for the Character Controller. So you can use Try Relative move for both Physics and Transform. I am using it with transform to make it so my AI are colliding. But if you are going for purely Physics why use Try Relative Move when you can add in a PhysX RigidBody and apply the impulses in the graph while the Rigid Body will collide for you, so no Try Relative Move would be needed in that situation.

1 Like

Absolutely :slight_smile:

It depends on the type of movement you’re trying to achieve, for example the doors in Starter Game use Try Relative Move because their movement is not a free physical movement, it’s constrained to a certain range and direction.

On the other hand, say you’re moving a marble or firing a projectile, or even simulating some type of vehicle, and many other cases, then using impulses will give you the results you’re looking for.


For the most control you can use the ‘Custom’ movement mode and then handle the movement yourself using whatever method you want in your script, this is how the AI in StarterGame work. They use ‘Custom’ and have nodes to receive the path notifications which tell them the next point along the path they should navigate to, then we point them in that direction and move them using animation.

In the future, we’ll want to update the physics interactions so that the characters respect collisions better - right now when your character walks into a heavy rigid body you still move it out of the way no matter the mass, but what should happen is we apply forces to the heavy object based on the mass of the character and the object, and then move the player accordingly.

1 Like

Thank you so much @LS1 @petrocket @lmbr_Saulty @WashedUpStudios :star_struck: :rose: :pray: :pray:

Solved , I tested , I can detect collisions my spaceships now :sunglasses: