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

PhysicsEnginePlatformer infinity loop #128

Closed
dzervas opened this Issue Oct 1, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@dzervas
Contributor

dzervas commented Oct 1, 2017

                    while check_for_collision(self.player_sprite, item):
                        self.player_sprite.bottom = item.top

at line 133 in arcade/physics_engines.py infinity loops when my AnimatedWalkingSprite falls on a platform. The problem is that item.top is 32 and self.player_sprite.bottom is 31.99999999996 :)

Took ~8 hours to find that...

Thing is, I can't quite follow the math behind the engine. Can someone help me solve it?

@pvcraven

This comment has been minimized.

Show comment
Hide comment
@pvcraven

pvcraven Oct 3, 2017

Owner

I've spent a lot of time with rounding errors and that section of code. Looks like it needs more work.

Owner

pvcraven commented Oct 3, 2017

I've spent a lot of time with rounding errors and that section of code. Looks like it needs more work.

@dzervas

This comment has been minimized.

Show comment
Hide comment
@dzervas

dzervas Oct 3, 2017

Contributor

Ugh, I know...
Spent the whole weekend just to find where the hell stuff are not rounded...
Do you think I fixed it in #129? Or it's somewhere deeper we need to look?

Contributor

dzervas commented Oct 3, 2017

Ugh, I know...
Spent the whole weekend just to find where the hell stuff are not rounded...
Do you think I fixed it in #129? Or it's somewhere deeper we need to look?

@pvcraven pvcraven added this to the 1.2.2 milestone Nov 25, 2017

@pvcraven

This comment has been minimized.

Show comment
Hide comment
@pvcraven

pvcraven Dec 2, 2017

Owner

Closed, implemented in 1.2.2 which is now deployed on PyPi.

Owner

pvcraven commented Dec 2, 2017

Closed, implemented in 1.2.2 which is now deployed on PyPi.

@pvcraven pvcraven closed this Dec 2, 2017

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