play icon indicating copy to clipboard operation
play copied to clipboard

Sprite with physics acts as if the size is always 100

Open tomosmc opened this issue 2 years ago • 0 comments

Hello, with the following code:

import play

sprite = play.new_circle(color='gray', size=80)
sprite.start_physics(obeys_gravity=True, bounciness=0,stable=True, friction=0)

play.start_program()

My sprite will stop falling before hitting play.screen.bottom, because it seems to think the size is still a 100. When making a move function where the sprite can go left and right based on user input, it also isn't able to reach all the way to the screen edge.

To try and fix this, I've tried completely reinstalling the newest version of python, and installing replit-play with pip. After that, I tried to start the program, but got the following error: "module 'pymunk' has no attribute 'inf'", so I changed line 779 to moment = float("inf"), following the advice of issue #32.

Is there anything I can do to fix this?

https://github.com/replit/play/assets/111377619/677a4f97-215f-4b2f-b272-79d1f919d0c6

tomosmc avatar Jan 14 '24 12:01 tomosmc