Skip to content
This repository was archived by the owner on Feb 11, 2025. It is now read-only.
This repository was archived by the owner on Feb 11, 2025. It is now read-only.

Sprite with physics acts as if the size is always 100 #38

@tomosmc

Description

@tomosmc

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?

problem.mp4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions