-
-
Notifications
You must be signed in to change notification settings - Fork 21.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Raycast can collide with area even if monitorable property is set to false #41155
Comments
RayCast node should respect the Areas properties. Manual raycasting via physics state should not. |
Physics servers have methods like The
The
Ray cast nodes themselves cannot be considered as physics bodies (they do not affect the outcome by themselves, after all), more like physics/geometry tool. Ray casts have
Those properties could also be conveniently grouped in the inspector. |
Would this be fixed in godot 3.x or only on 4.x releases? |
It's unknown whether this is actually a bug in the first place. There hasn't been much discussion around the existing behavior (only two people have commented above). |
I understand, but as end-user I think it would be nice to mentioned this at least in the raycast/areas docs. |
I'm not sure what the solution will be in the end, but if anything is changed it will be for 4.x only because it will very likely break compatibility. In 4.x we don't really need these properties anymore since collision layers will be one-directional for areas. That means you can achieve all the same use cases through collision layers, but we can still keep the properties for convenience. The solution proposed by @Xrayez seems like a good candidate, property names can make things more clear. Having some areas ignored by some raycasts can still be achieved through collision layers.
Yes, for 3.x we can at least update the doc to make it clearer. |
I think this is a real bug. Another way to see it is if all the shapes inside the Area2D are disabled=true, the raycast ignore the whole area, which is the expected behaviour. This is the workaround I had to do to ignore the Area2D, not big deal, but I guess set monitorable=false should have the same behaviour. |
For what it's worth, I would consider this a bug. This is strange functionality and intuitively, I think that if an The idea to rename the properties to be more clear about what it's actually doing is fine, but I would much rather it be possible to disable an EDIT: You can set all the |
For another perspective, I don't think this should be considered a bug. I have a use case where I only need to run raycasts against a particular collection of collision volumes at a certain time (triggered by game events). I don't need continuous monitoring of these volumes, and being able to turn that off while still maintaining the ability to manually ray cast on demand seems like it should be a performance win. |
Would add my voice to this not being a bug, I would however say it's a lack of a feature, and that instead of making monitoring control ray casting instead add a separate setting to control this, alternatively add an option in the ray cast to filter on monitorable, I feel it'd be too restrictive to have to pick between either no interaction or all interactions, as mentioned by others there's valid situations where you want raycast and not body interactions and visa versa |
There's really no issue with casting, checking if the result contains a disabled area, and casting again if it does. |
Agreed, was mostly suggesting alternatives if we want more ease of use with this My suggestion would be to possibly make this more clear in documentation (though I'd say it is clear enough as it says what it controls) and then close as not a bug, and people can open a proposal for alternatives to how to control this I'm also guessing that |
Godot version:
Godot 3.2.3 RC 3
OS/device including version:
Windows 10
Issue description:
When monitorable property of an area is set to false, other area can't detect it as the documention explains it.
But raycasts can still collide with this area.
I know that there is an input_ray_pickable property but it seems very strange that unmonitorable area are not so unmonitorable.
So bug or feature ?
Thanks.
Steps to reproduce:
Set up a raycast and an area with monitorable set to false.
Raycast can still detect aera.
The text was updated successfully, but these errors were encountered: