Questions tagged [pymunk]

Pymunk is a 2D physics library for Python built on top of Chipmunk.

Pymunk is a 2D rigid body physics library for Python based on the MIT licensed Chipmunk Project. It's home page is http://www.pymunk.org/en/latest/.

According to the home page, Pymunk is intended to be easy to use and "pythonic". Pymunk allows you to define and simulate the behaviour of objects with mass, position, velocity and collision properties (i.e. a shape) in a 2D space. It is frequently used for game development. Pymunk provides a large number of examples.

Further Information

176 questions
0
votes
0 answers

Can't replace one body/shape with two body/shapes in pymunk

I am working on a program with pymunk and pygame where I am trying to simulate objects growing and dividing. I have implemented this by stepping through the program and removing each body/shape at certain intervals and adding a new, slightly larger…
dottified
  • 45
  • 4
0
votes
2 answers

Object not being added to space in pymunk

I'm attempting to write a program using pymunk and pygame. The program(as of right now) is just a car driving with some obstacles. I'm trying to use pymunk to check if the car and any obstacle have collided, and if they do I will have some other…
0
votes
1 answer

N gravity simulator using Pymunk

I am using Pymunk to make a gravity simulator. The problem I am facing is the units. For example, if I want to define the constant G for the vector Force, how do I do it? I need some sort of conversion table for this. I already tested 9.8 using the…
angelustt
  • 109
  • 1
  • 3
  • 9
0
votes
1 answer

I can't understand _chipmunk_cffi.lib cp

When I trace to _chipmunk_cffi.py, it is from pymunk._chipmunk_cffi_abi import ffi, lib, lib_path. So I trace to _chipmunk_cffi_abi.py and it's only lib, lib_path = load_library(ffi, "chipmunk", debug_lib=_lib_debug) but I can't find ffi anymore. So…
sasalicat
  • 11
  • 1
0
votes
1 answer

How do I examine if I have properly installed pymunk

I typed "python3 install pymunk" in terminal and seems that it is installed. But how do I, in terminal, examine it is properly installed? I tried to type "import pymunk" in terminal, yet it says -bash: import: command not found When I run pymunk in…
user214969
  • 21
  • 5
0
votes
2 answers

pyinstaller fails to load a dll that is present

Windows 7 64-bit - Python 2.6 32-bit - Pymunk 4.0.0 Ok, Thanks to Using Pymunk with Pyinstaller . It took me a long time but I now understand how to throw anything I want into an exe with Pyinstaller. However, a particular dll-that is there-still…
Kaliber64
  • 586
  • 1
  • 5
  • 16
0
votes
1 answer

Adding points to pymunk poly

I'm having some trouble creating Polygons in Pymunk. import pymunk space = pymunk.Space() space.gravity = (0.0, 900.0) box_points=[(-100,-100), (100,-100), (100,100), (-100, 100)] body = pymunk.Body(10.0, 1000.0) body.position =…
noio
  • 5,744
  • 7
  • 44
  • 61
-1
votes
1 answer

Pymunk change color of the shape on collision

I am using pymunk for my pinball game. I am using four circle shapes, three as a bumper and one as a ball. I need to change color of the shape that has collided with the ball. bumper code : for p in [(230, 100), (370, 100),(300,140)]: body =…
ghost21blade
  • 731
  • 2
  • 8
  • 21
-1
votes
1 answer

Conveyor belt kinematics Python

I'm trying to create a simulation for a conveyor belt with objects on it, to see how the behaviour would be. I am playing around but struggling with the functionality of the conveyor belt. Right now, I try to add impulse or velocity to the objects…
-1
votes
1 answer

Using Pygame and Pymunk Circle will not spawn in space

So, I'm trying to make a function create_particle then make the function draw a partial with draw_circle. However, whenever I open the window, I get my grey window but no particle is shown. I'm extremely new to both pygame and pymunk so any help is…
-4
votes
1 answer

I am making a pong game and I want pymunk to detect what object it touched last

I am making a pong game with powerups using pygame and pymunk and was I want the powerup to go to the last person who touched the ball what code can I use to accomplish this Thanks!
1 2 3
11
12