Want help setting up pathfinding for AI character

Before proceeding, please use the forum search feature at the top of the page to check if your question has already been answered.

How do I…

I want to make an AI costumer for my unreleased supermarket simulator game. I want him to pass from all shelfs (stay on each one for a second) and also don’t want the customer to pass through walls or shelfs

What is the expected result

When the game is run, once you open your market a costumer comes after some seconds and browse the shop. If they find something, they come to the cash register

What is the actual result

The character doesn’t move.

Related screenshots

I haven’t made any code because I haven’t set it up

Project files (optional)

Insert a minimal game showing your issue in a .zip or .rar.

Hi,

To make your ai customers walk around the shelves, use the Pathfinding behaviour and add obstacle behaviour to impassable objects like walls and shelves. Then, use a state machine to move the customer to each shelf one by one using Move to position behaviour action. After reaching a shelf, add a small wait with a Wait action or a timer, then move to the next.

One solution could be to create a few pre-defined paths and have it pick one at a random then circle between them , eventually ending at a final destination like the cash register.

Pathfinding
Pathfinding Reference