I always get this error message and I can´t get it away, can someone help?
AssertionError: The shape's body must be added to the space before (or at the same time) as the shape. the code that has the error (just a cutout of my project) just saying, I got pygmames and pymunk installed space = pymunk.Space() space.gravity = (0, -900) ground_body = pymunk.Body(body_type=pymunk.Body.STATIC) ground_shape = pymunk.Segment(ground_body, (0, 0), (SCREEN_WIDTH, 0), 5) space.add(ground_body, ground_shape) rope_body = pymunk.Body(body_type=pymunk.Body.KINEMATIC) rope_points = [(SCREEN_WIDTH // 2, SCREEN_HEIGHT), (SCREEN_WIDTH // 2, SCREEN_HEIGHT - ROPE_LENGTH)] rope_constraints = [] for i in range(len(rope_points) - 1): segment = pymunk.Segment(rope_body, rope_points[i], rope_points[i + 1], 5) segment.elasticity = 0.9 segment.friction = 0.5 segment.stiffness = ROPE_STIFFNESS space.add(segment) rope_constraints.append(segment) hope someone can help