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

RayCast2D will not collide with TileMap if it's fully inside tile #36259

Closed
Tracked by #39876 ...
gforceg opened this issue Feb 16, 2020 · 3 comments · Fixed by #54857
Closed
Tracked by #39876 ...

RayCast2D will not collide with TileMap if it's fully inside tile #36259

gforceg opened this issue Feb 16, 2020 · 3 comments · Fixed by #54857

Comments

@gforceg
Copy link

gforceg commented Feb 16, 2020

Godot version:
3.2.stable

OS/device including version:
elementary OS 5.1 Hera (Ubuntu 18.04.3 LTS)

Issue description:
I have a RayCast2D that is a child node of an Area2D. When RayCast2D does not overlap with its parent, is_colliding() is always false when the ray overlaps with a tile.
The ray is enabled and it does ignores its parent.

unknown

Steps to reproduce:
Create an Area2D scene with a RayCast2D element that does not overlap with its parent Area2D. The RayCast2D will not collide with tiles that have a collision shape

Minimal reproduction project:
https://gitlab.com/gforceg/raycast-problem

@gforceg
Copy link
Author

gforceg commented Feb 16, 2020

The rays are 32px in length which is half the TileMap cell size. I notice that if I increase them to 64 they colliide with the tiles.

@Xrayez
Copy link
Contributor

Xrayez commented Feb 16, 2020

In the second case you linked in the project the raycast lies inside the tile, so no intersection is detected against the tile's geometry. I think it would be preferred that the raycast could return the intersection point if the origin lies inside the geometry. Related to #35845.

@KoBeWi
Copy link
Member

KoBeWi commented Dec 21, 2020

Still valid in 3.2.4 beta4

@KoBeWi KoBeWi changed the title RayCast2D will not collide with TileMap unless it overlaps with Area2D(Parent) RayCast2D will not collide with TileMap if it's fully inside tile Dec 21, 2020
@akien-mga akien-mga added this to the 4.0 milestone Nov 11, 2021
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.

5 participants