Godot Version
4.3
Question
I am making a simple 2d game where a user has to run through a room that has cameras in it rotating, if they get caught by the camera then they lose. What I am trying to do is limit my camera “view” (when I say camera and view here I am talking about an area2D with sprites and a CollisionPolygon, the view is how I imagine what the camera is able to see) so that when it hits a wall it doesn’t clip through the wall with the collision object.
I have attached an image which I hope shows what my thought is, basically in my current context a camera can look at a wall and the collision object will go through the wall and “catch” people on the other side, whereas in real life people can’t be seen on the other side of a wall.
I believe I could have my setup of the scene done incorrectly, I only just started yesterday and I cant find much information on this sort of setup. My “camera” scene is an Area2D with Sprites for the “camera” and the “view”
And my walls are a StaticBody2D with sprites
Many thanks