How to use the pathfinding behavior with different movement

how do I use the pathfinding behavior as a guide to moving objects using the waypoints that the pathfinding calculates


When I try this the enemy just moves to the first waypoint then stops at that one. I tried using the node index for finding the objects position on its path but I couldnt get it to work.

What do you mean by first way point? The first node along the path, or the destination?

1 Like

the first node, so Im trying to have the pathfinding register when I reach a node so I can move to the next

I suspect that under the hood, the node index isn’t changing, so the next node will always be the same.

Personally, I’d avoid messing with the pathfinding behaviour like that. Instead, I’d put all the node positions into an object array of structures, stop the move and then traverse along the points stored in the object array.

1 Like

Thanks, I also got it to work just by running the move action every frame

Sure, but that doesn’t seem to be what you were asking earlier. All you’re doing now is moving the player with a force, then finding a new path, every frame. Why apply the force at all? It just seems pointless.

1 Like

for the physics and collision so a bunch of them seamlessly collide with each other and bounce around

So to get around the issue of enemies on converging paths overlapping each other? If it works, make a new tread, because there will be devs interested in the solution

1 Like