Commit | Line | Data |
---|---|---|
ea38777c FC |
1 | from panda3d.core import TransformState |
2 | from panda3d.bullet import BulletCylinderShape, BulletRigidBodyNode, BulletGhostNode, YUp, ZUp | |
3 | from pmachines.items.item import Item | |
4 | ||
5 | ||
6 | class TeeterTooter(Item): | |
7 | ||
8 | def __init__(self, world, plane_node, count, cb_inst, curr_bottom, repos): | |
9 | super().__init__(world, plane_node, count, cb_inst, curr_bottom, repos, 'assets/gltf/teeter_tooter/teeter_tooter.gltf', exp_num_contacts=2) | |
10 | ||
11 | def _set_shape(self): | |
12 | self.node.add_shape( | |
13 | BulletCylinderShape(.1, 1.6, YUp), | |
14 | TransformState.makePos((0, 0, .36))) | |
15 | self.node.add_shape( | |
16 | BulletCylinderShape(.1, .7, ZUp), | |
17 | TransformState.makePos((0, .8, -.1))) | |
18 | self.node.add_shape( | |
19 | BulletCylinderShape(.1, .7, ZUp), | |
20 | TransformState.makePos((0, -.8, -.1))) |