【发布时间】:2017-08-27 17:40:49
【问题描述】:
我正在尝试学习 PyMunk 库,我使用了他们网站上的示例。 这是一个代码:
import pymunk # Import pymunk..
space = pymunk.Space() # Create a Space which contain the simulation
space.gravity = 0,-1000 # Set its gravity
body = pymunk.Body(1,1666) # Create a Body with mass and moment
body.position = 50,100 # Set the position of the body
poly = pymunk.Poly.create_box(body) # Create a box shape and attach to body
space.add(body, poly) # Add both body and shape to the simulation
while True: # Infinite loop simulation
space.step(0.02) # Step the simulation one step forward
当我运行它时,窗口不显示,并且在 CMD 中显示:Loading chipmunk for Windows (64bit) [C:\Users\Theo\AppData\Local\Programs\Python\Python35\lib\site-packages\pymunk\chipmunk.dll] 并且不加载任何内容。我等了一个小时。有什么问题?
【问题讨论】:
标签: python python-3.x pymunk