Source

pymissile / physic.py

import pymunk

from constants import SCREEN_HEIGHT

space = pymunk.Space() #2
space.gravity = (0.0, -300.0)

def to_pygame(p):
    """Small hack to convert pymunk to pygame coordinates"""
    return int(p.x), int(-p.y+SCREEN_HEIGHT)

def to_pymunk(p):
  return p[0], SCREEN_HEIGHT-p[1]