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

Freezes when static body collides #240

Closed
OTube opened this issue Nov 14, 2023 · 5 comments
Closed

Freezes when static body collides #240

OTube opened this issue Nov 14, 2023 · 5 comments

Comments

@OTube
Copy link

OTube commented Nov 14, 2023

Screenshot_20231114_192937
Demos stuck on static body collision. I have tried to use static bodies at code and program have got stuck on cpSpaceStep method.

@OTube
Copy link
Author

OTube commented Nov 14, 2023

Hello example also doesnt work.
Time is 0.00. ballBody is at ( 0.00, 15.00). It's velocity is ( 0.00, 0.00)
Time is 0.02. ballBody is at ( 0.00, 15.00). It's velocity is ( 0.00, -1.67)
Time is 0.03. ballBody is at ( 0.00, 14.97). It's velocity is ( 0.00, -3.33)
Time is 0.05. ballBody is at ( 0.00, 14.92). It's velocity is ( 0.00, -5.00)
Time is 0.07. ballBody is at ( 0.00, 14.83). It's velocity is ( 0.00, -6.67)
Time is 0.08. ballBody is at ( 0.00, 14.72). It's velocity is ( 0.00, -8.33)
Time is 0.10. ballBody is at ( 0.00, 14.58). It's velocity is ( 0.00, -10.00)
Time is 0.12. ballBody is at ( 0.00, 14.42). It's velocity is ( 0.00, -11.67)
Time is 0.13. ballBody is at ( 0.00, 14.22). It's velocity is ( 0.00, -13.33)
Time is 0.15. ballBody is at ( 0.00, 14.00). It's velocity is ( 0.00, -15.00)
Time is 0.17. ballBody is at ( 0.00, 13.75). It's velocity is ( 0.00, -16.67)
Time is 0.18. ballBody is at ( 0.00, 13.47). It's velocity is ( 0.00, -18.33)
Time is 0.20. ballBody is at ( 0.00, 13.17). It's velocity is ( 0.00, -20.00)
Time is 0.22. ballBody is at ( 0.00, 12.83). It's velocity is ( 0.00, -21.67)
Time is 0.23. ballBody is at ( 0.00, 12.47). It's velocity is ( 0.00, -23.33)
Time is 0.25. ballBody is at ( 0.00, 12.08). It's velocity is ( 0.00, -25.00)
Time is 0.27. ballBody is at ( 0.00, 11.67). It's velocity is ( 0.00, -26.67)
Time is 0.28. ballBody is at ( 0.00, 11.22). It's velocity is ( 0.00, -28.33)
Time is 0.30. ballBody is at ( 0.00, 10.75). It's velocity is ( 0.00, -30.00)
Time is 0.32. ballBody is at ( 0.00, 10.25). It's velocity is ( 0.00, -31.67)
Time is 0.33. ballBody is at ( 0.00, 9.72). It's velocity is ( 0.00, -33.33)
Time is 0.35. ballBody is at ( 0.00, 9.17). It's velocity is ( 0.00, -35.00)
Time is 0.37. ballBody is at ( 0.00, 8.58). It's velocity is ( 0.00, -36.67)
Time is 0.38. ballBody is at ( 0.00, 7.97). It's velocity is ( 0.00, -38.33)
Time is 0.40. ballBody is at ( 0.00, 7.33). It's velocity is ( 0.00, -40.00)
Time is 0.42. ballBody is at ( 0.00, 6.67). It's velocity is ( 0.00, -41.67)
Time is 0.43. ballBody is at ( 0.00, 5.97). It's velocity is ( 0.00, -43.33)
Time is 0.45. ballBody is at ( 0.00, 5.25). It's velocity is ( 0.00, -45.00)
Time is 0.47. ballBody is at ( 0.00, 4.50). It's velocity is ( 7.32, -1.83)
crush

@OTube OTube changed the title Freezes when two static bodies collide Freezes when static body collides Nov 14, 2023
@aismann
Copy link
Contributor

aismann commented Nov 15, 2023

How can static bodies colide?
Better using kinematic bodies

And maybe read this also
http://chipmunk-physics.net/release/ChipmunkLatest-Docs/#cpSpace-SpatialIndexing

@OTube
Copy link
Author

OTube commented Nov 15, 2023

@aismann Thank You for the feedback! I found similiar issue at #233. I use gcc 13 in arch linux too.

@slembcke
Copy link
Owner

Aurgh! Yeah. I was going to ask if you are using GCC 13. I still haven't had the time to fully track this down. :( You can bypass the issue by disabling object sleeping for now. space->sleepTimeThreshold = INFINITY

@slembcke
Copy link
Owner

slembcke commented Nov 15, 2023

Duplicate of #233. Follow that issue for more information.

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

No branches or pull requests

3 participants