Godot Version
v4.2.1.stable.mono.official [b09f793f5]
Question
Hi there, linked is a video of a weird instance of raycast behaviour. What you’re seeing is the enemy tracking the player’s position via a raycast, but from time to time the raycast arrow turns blue and causes the enemy to switch into their “idle” state, which should only happen if they do not detect the player’s rigidbody.
The pathfinding for moving towards the player is updated every 1 second, but I have no idea why that is causing the issue as the two should be separate by all accounts. Changing it to update every frame fixes the issue, which is also puzzling me.
At the end of the day, keeping it per-frame is not an issue here. I’m more just curious now about what’s causing this to happen, if anyone knows.