Yay, i made an elevator!

Hey all!
I just wanted to show you an elevator system that i made in Unity, in combination with the a* pathfinding project.

Here’s a video:
Youtube video

After getting some ideas from Aron, this is how it works basically:
The whole building is a recast graph, and the elevator floors have a nodelink at the elevator buttons, to the next floor.
The seeker first gets the full path from outside the building to the desired workstation, and then i’m using the path-list to split the path into smaller parts, and then i have the possibility to handle the elevator logic separately.

So then the character walks to the elevators using the vectorpath up until that point, and then i’m handling the elevator logic outside the pathfinding, and when the character reaches it’s target floor, the pathfinder kicks in again.

It’s a bit of a hack, but it’s working reliably.
Just need to optimize the elevatorsystem, and rewrite the code where the character walks in to the elevator.

1 Like