Here’s my Check Distance decorator:
Nothing fancy, as you can see. I’m using this same decorator in a similar behavior tree for a land-based enemy, who works fine.
I cobbled together a gif of the tree and the viewpoint in tandem:
I do a bit of hopping around, weaving in and out of the enemy’s attention. As soon as I weave in, it wakes up and flies to me, but it will only fly to where I was standing when I weaved in, instead of continuously following me.
Basically the enemy will fly to wherever the player was last standing and then spams that branch. I don’t think the player’s position is being updated – then again, if it weren’t, wouldn’t the “Close to player?” branch be activated? So I don’t know.
Weirdly enough, I don’t think I’ve ever made a gif before. It’s easier than I thought it would be.
Anyway, thank you for your help.