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

fix rect.clipline(line) #3999 #4376

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

fix rect.clipline(line) #3999 #4376

wants to merge 2 commits into from

Conversation

yanchengbo
Copy link

The function pg_rect_clipline() was modified to properly track multiple collision data and ensure that intersection information is not overwritten when handling multiple rectangles or complex scenarios.
Added logic to normalize rectangles with negative dimensions before performing the intersection check.
Added a collision detection flag to ensure that the function correctly tracks whether a collision occurred before returning the clipped line coordinates.

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.

1 participant