Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(3)  |  Derive(0)  |  Import(1)

src/w/r/Wrappyr-HEAD/tests/test_box2d.py   Wrappyr(Download)
from Box2D.common import b2Vec2
from Box2D.collision.shapes import b2PolygonShape
from Box2D.dynamics import b2World, b2Body, b2BodyDef, b2FixtureDef, b2RayCastCallback
 
#from Box2D import *
groundBox.SetAsBox(50.0, 10.0)
 
fixtureDef = b2FixtureDef()
fixtureDef.shape = groundBox
fixtureDef.density = 0.0
dynamicBox.SetAsBox(1.0, 1.0)
 
fixtureDef = b2FixtureDef()
fixtureDef.shape = dynamicBox
fixtureDef.density = 1.0
slopeShape.Set(vertices, 3)
 
fixtureDef = b2FixtureDef()
fixtureDef.shape = slopeShape
fixtureDef.density = 0.0