71c0c007fbe61976f1f382d129d072f108bbb7a6
1 from panda3d
.bullet
import BulletBoxShape
, BulletRigidBodyNode
5 def __init__(self
, world
):
6 shape
= BulletBoxShape((.5, .5, .5))
7 self
.node
= BulletRigidBodyNode('box')
8 # self.node.set_mass(1) # static/dynamic
9 self
.node
.add_shape(shape
)
10 np
= render
.attach_new_node(self
.node
)
12 world
.attach_rigid_body(self
.node
)
13 model
= loader
.load_model('assets/gltf/box/box.gltf')
17 def on_click(self
, hit
):
18 print(hit
.get_hit_pos())