【发布时间】:2016-06-09 18:46:20
【问题描述】:
我正在使用 Bullet Open Source Physics Library 1.5.8 使用 Panda3D 1.10 编写游戏。如何从 egg 文件生成碰撞形状?
这是我目前的代码:
tree = BulletRigidBodyNode('Tree')
tree.setMass(10.0)
shape = getCollisionFromEgg('tree.egg') # This is the 'magic function' I'm after
tree.addShape(shape)
np = render.attachNewNode(tree)
np.setPos(10, 0, 2)
self.world.attachRigidBody(tree)
model = loader.loadModel('tree.egg')
model.reparentTo(np)
【问题讨论】:
标签: python bulletphysics panda3d