Skip to content
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

intersect_point ignores collision_layer argument #40705

Closed
IvanSoldano opened this issue Jul 25, 2020 · 1 comment · Fixed by #40776
Closed

intersect_point ignores collision_layer argument #40705

IvanSoldano opened this issue Jul 25, 2020 · 1 comment · Fixed by #40776

Comments

@IvanSoldano
Copy link

Godot version:

3.2.3 RC 1 win64

OS/device including version
Windows 10

Issue description:

Physics2DDirectSpaceState.intersect_point ignores the collision_layer argument and returns any intersecting area or body regardless of the layer it is on. Works fine in version 3.2.2 Stable win64

Steps to reproduce:
Use the reproduction project to check for collisions with the mouse pointer, notice how intersect_ray works correctly compared to intersect_point

Minimal reproduction project:

IntersectPointCollisionLayerIgnored.zip

@madmiraal
Copy link
Contributor

#40193 deliberately removed the collision layer checking, because it was thought that:

_intersect_point_impl() isn't used for anything else than mouse picking, so making it ignore layers is safe.

Of course _intersect_point_impl() is also used by PhysicsDirectSpaceState's intersect_point() function, hence this issue.

My suggestion is to revert #40193 and its 3.2 counterpart #40280 and find an alternative solution for #11159.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants