Korovic And The Squid - Day 2
Day 2 has seen rapid progress what with it being a bank holiday in the UK. I've bunged together some fairly crude physics courtesy of Pymunk and bolted that into Pyglet to render the art that I largely drew yesterday.I've not used Pymunk before - I've always used pyBox2D in my experiments. On the plus side Pymunk seems to be more Pythonic, with excellent support for various collision callbacks. On the downside I've not found moment of inertia and centre of gravity calculations built in. Or perhaps I'm missing a trick.
So right now we can tweak Susie's engines:
And rather clumsily fly her:
(log in to comment)
Comments
Just come across this as I've tried to add components with insertion points offset from the centre of gravity.
hidas on 2012/05/07 23:06:
If your talking about finding the moment of inertia to define bodies, pymunk has some built in:pymunk.moment_for_poly
pymunk.moment_for_box
pymunk.moment_for_segment
pymunk.moment_for_circle
You can find the docs at the pymunk googlecode website.