Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7801845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T01:04:17+00:00 2026-06-02T01:04:17+00:00

I am doing some operations with vectors and physics in PyGame and the default

  • 0

I am doing some operations with vectors and physics in PyGame and the default coordinate system is inconvenient for me. Normally the (0, 0) point is at the top-left corner, but I would rather that the origin were at the bottom-left corner. I would rather change the coordinate system than converting every single thing I have to draw.

Is it possible to change the coordinate system in PyGame to make it work like this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T01:04:19+00:00Added an answer on June 2, 2026 at 1:04 am

    Unfortunately, pygame does not provide any such functionality. The simplest way to do it would be to have a function to convert coordinates, and use it just before drawing any object.

    def to_pygame(coords, height):
        """Convert coordinates into pygame coordinates (lower-left => top left)."""
        return (coords[0], height - coords[1])
    

    This will take your coordinates and convert them into pygame’s coordinates for drawing, given height, the height of the window, and coords, the top left corner of an object.

    To instead use the bottom left corner of the object, you can take the above formula, and subtract the object’s height:

    def to_pygame(coords, height, obj_height):
        """Convert an object's coords into pygame coordinates (lower-left of object => top left in pygame coords)."""
        return (coords[0], height - coords[1] - obj_height)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new to Codeigniter and PHP.. while doing some operations i have some
I am doing some operations in for loop with nsmutablearray' s data. But sometimes
I was doing some operations with arrays, like this (very simple) a = [1,
I am running two separate threads in C, both doing some operations. Both threads
I am using tabbarviewcontroller and i am doing some operations on 3 out of
In specific: Im doing some math operations, and the application keeps crashing because a
I am experiencing strange issue with scrolling, After doing some ajax operations on a
I want to make a generic function for doing some operations, like: ConvertValue<T>(string value)
I am doing some CRUD operations using JPA. For updating an object which is
I have a futures task that is doing some I/O operations over the socket

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.