Skip to main content

A way to manage physics of objects in pygame

Project description

A simple way to manage physics in pygame.

The Physics() object contains all the info you need.

p = Physics(

    # rect is a pygame.Rect object that represents the object on screen
    rect,

    # All of these values are vectors (x, y) where the x/y represent pixels per second
    initVelocity=(0, 0),
    initAcceleration=(0, 0),
    initAngularVelocity=0,
    initAngularAcceleration=0,
    friction=0,  # friction in pixels per second (for both x and y directions)
    angularFriction=0,  # degrees per second
)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pygame_physics-0.0.0.tar.gz (2.3 kB view hashes)

Uploaded Source

Built Distribution

pygame_physics-0.0.0-py3-none-any.whl (2.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page