Pathfinder AI that only moves when you're not looking at it

Can someone make circuits for when you look away a ai will move towards you and when you look back the ai stops moving

Hi there! Sure, this kind of circuit should be pretty simple in rooms 2.0.

This circuit graph below works in my 2.0 room. You just need to bake the nav mesh in the settings. The pathfinder component moves towards me whenever I’m not looking at it, you can change the degree at which decides to move towards you on the “greater than” chip.


The way this works is by first getting the closest player to the pathfinder in the room, then calculates the vector that is pointing towards the pathfinder from the players camera and measures the delta using a “vector dot” chip and converts to degrees using an “acos” chip, if the delta is bigger than the value in the greater than chip it will start the pathfinder and stop it when it’s less than that value.

The delay chip is there because the pathfinder doesn’t appear to move when directly connected to the “update” event receiver. The delay chip is connected to itself from the “after delay” port to the cancel to only allow an execution every 0.3 seconds.

Hope this helps!

5 Likes

Thanks!

Can you friend me? i cant see the circuits well, like the names

Yeah here’s my RecRoom @NGCreate I accept all friend requests so just send me a message letting me know it’s you from the creator forum. I should be able to recognize you since they are linked.

yo bro