I'm trying to edit a physics object's alpha value but it doesn't seem to be working. Every other value is working, however. What can I do to get the opacity to change?
# Creating objects class
class create_physics_object:
# Rectangle
def rect(self, space, posX, posY, width, height, mass, color, bodytype):
body = pymunk.Body(body_type=bodytype)
body.position = posX, posY
shape = pymunk.Poly.create_box(body, (width, height))
shape.mass = mass
shape.color = color
space.add(body, shape)
return shape
create_physics_object = create_physics_object()
# Create object
rect = create_physics_object.rect(space, 32, 32, 32, 32, 30, (255, 0, 0, 50), pymunk.Body.DYNAMIC)