-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need small update for new pyglet (v2.1) to use shapes.Line function in pymunk.pyglet_util #267
Comments
I had the same problem as @AkahoshiT, changing the "width" to "thickness" solved the problem. But there is an another problem related to the problem above. If you create a DYNAMIC body, and add a shape to it:
This code results to the following error: This error comes from the pyglet_util.DrawOptions |
Thanks for the report! As for the thickness.. Its easy to fix, but that breaks pyglet 2.0.x.. And I have already fallback code for pyglet 1.5, Im not so much into having 2 different fallbacks. But I guess it should be ok to break it This is only relevant if you use pyglet for something complicated and at the same time use debug draw. At the same time, I think I can remove support for 1.5 now. (But maybe in a separate release), now a long time passed since 2.0 were released, and its difficult to think of cases were you need to both use latest pymunk but at the same time such an old pyglet version. |
@totex Can you expand on your example? Both pyglet_util_demo and box2d_vertical_stack works so not sure what you do? |
@viblo Sorry, it looks like, I just forgot to create the body correctly. I have created a DYNAMIC body without the mass and the moment, like this: I tried it like this, and it works: |
Ah, this error again. Not the first time it happens: #226 Now I suspect this is the most common mistake.. |
width
is disabled in newpyglet.shapes.Line
and get warning if you run it.So we need to replace
width
withthickness
for newer version of pyglet.pymunk/pymunk/pyglet_util.py
Lines 127 to 135 in 83052ce
The text was updated successfully, but these errors were encountered: