60f9e7b93d385bc506fbfa5d10781a67953cd89a
1 from panda3d
.core
import TransformState
2 from panda3d
.bullet
import BulletCylinderShape
, BulletRigidBodyNode
, BulletGhostNode
, YUp
, ZUp
3 from pmachines
.items
.item
import Item
6 class TeeterTooter(Item
):
8 def __init__(self
, world
, plane_node
, cb_inst
, curr_bottom
, repos
, mass
=1, pos
=(0, 0, 0), r
=0, count
=0, restitution
=.5, friction
=.5):
9 super().__init
__(world
, plane_node
, cb_inst
, curr_bottom
, repos
, 'assets/gltf/teeter_tooter/teeter_tooter.gltf', exp_num_contacts
=2, mass
=1, pos
=(0, 0, 0), r
=0, count
=0, restitution
=restitution
, friction
=friction
)
13 BulletCylinderShape(.1, 1.6, YUp
),
14 TransformState
.makePos((0, 0, .36)))
16 BulletCylinderShape(.1, .7, ZUp
),
17 TransformState
.makePos((0, .8, -.1)))
19 BulletCylinderShape(.1, .7, ZUp
),
20 TransformState
.makePos((0, -.8, -.1)))