Skip to content

Conversation

@FengchiW
Copy link
Contributor

@FengchiW FengchiW commented Aug 4, 2024

Added a separate check to horizontal line segments, this resolves the issues but I'm still digging for why the original implementation fails to validate on this edge case

coin_list.append(sprite)
coin_list.append(sprite2)

# print()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why these comments are here

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just remove if they don't make sense. It means they have low value.

@FengchiW
Copy link
Contributor Author

FengchiW commented Aug 4, 2024

Arcade.Window.2024-08-04.11-19-38.mp4

@FengchiW
Copy link
Contributor Author

FengchiW commented Aug 4, 2024

The initial non-detection is because the window is not focused

Copy link
Member

@pushfoo pushfoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works here. 👍

@pushfoo pushfoo merged commit 29c3f70 into pythonarcade:point-in-polygon-fix Aug 7, 2024
einarf added a commit that referenced this pull request Sep 28, 2024
* split up geometry tests

* split up geometry tests

* Experimental smoke test tool based on einarf's prototype

* Point in polygon fix (#2336)

* Fixed get point in poly when getting a horizontal edge

* legacy changes

* Test cleanup

* tests: Point in box with zero width or height

* Fix collision code and tests

* Include both cc and cw polygons

---------

Co-authored-by: Einar Forselv <eforselv@gmail.com>
Co-authored-by: Wilson (Fengchi) Wang <wilsonfwang@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants