Godot Version
v4.2.2.stable.mono.official [15073afe3]
Question
I’m sure the answer is very obvious but I’m having a hard time figuring things out. I started working on my AI for my game, and the detection system I made has two parts. First, it’s a large Area2D which will detect when the player enters it, and once they did, it will start a timer which times out every 0.25 seconds, updating the TargetPosition property of a RayCast2D, which should stop as soon as it hits a wall, but report when it hits the player without anything in it’s way. This works, however, the TargetPosition does not. I will attach a screenshot of what happens. This happens in every case, if I just use _player.Position, or _player.GlobalPosition, or _player.GlobalTransform.Origin. Any help is very much appreciated!