#Ai Pathing in godot 4.0

13 messages · Page 1 of 1 (latest)

left ice
#

I have watched GDQuest video on Ai pathing for godot 3.5 and I am trying to get it to work in godot 4.0 beta 7 but I just cant get it to work for the life of me and I need help

summer cedar
#

You need to setup a navigation region. You can bake the mesh in the editor or at run time.
Then the entity you wish you move needs a navigation agent as a child.
Look at the navigation agent documentation, it's pretty self explanatory from there

left ice
#

I'm pretty new to code so I'm having a lot of troubles with it

summer cedar
#

Looks good other than the steering stuff. Did you try it without the steering?

left ice
#

ya then it wont move at all

summer cedar
#

set velocity to desired velocity

left ice
#

wdym how would i write that

summer cedar
#

Pretty sure velocity is a property of character body
Try velocity = _velocity before move and slide

left ice
#

So just velocity = desired velocity

summer cedar
#

Also do not do _velocity = move_and_slide
Call it by itself

left ice
#

Ok I will give it a try tomorrow and let u know

left ice
#

it didnt work

#

it will load up but the enemy wont move