-
-
Notifications
You must be signed in to change notification settings - Fork 192
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 freeze when actor width or height is 0 and tilemap is shown #1491
Fix freeze when actor width or height is 0 and tilemap is shown #1491
Conversation
This is my second merge request on an open source project ever, please let me know if I did it right! 🙂 |
In the failing test, an object with a non-zero size is being tested, but it fails anyway. My implementation might have been naive. Will look into this further. |
Test Testing the code tells me collisions work; they don't seem to have broken. Except for zero-size actors, which now are not checked at all. Is this behavior acceptable? On another note: can actor widths and heights ever be a negative value? |
I think this is a flakey test that was discovered, not related to TileMaps.
I think negative widths/heights are unexpected and should be an error. Zero
width and heights do have a use.
…On Tue, Apr 14, 2020 at 8:50 AM Vincent Beers ***@***.***> wrote:
Test 'should collide with other polygons when touching' fails, but I have
no clue why, because on further inspection it does nothing with TileMaps.
Is it even related?
On another note: can actor widths and heights ever be a negative value?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1491 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEVNZYFXJGU25UKVZDJPQ3RMRS2FANCNFSM4MHUXCBA>
.
|
@kamranayub ^ Any more info on this test |
@DaVince This looks great, is it possible to add a test for this fix? (ignore the flakey test) |
If it is too onerous to add a test for this let me know. |
I wouldn't worry about that test, it has failed in master before and will pass on a rebuild. Definitely flaky. |
Thanks for all the great feedback!
Sure, I'm on it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DaVince Thanks again for the contribution!
Closes #1418
TileMapImpl.collides() got stuck infinitely on the
trace points for overlap
loop when the actor's size is zero.Changes: