def add_solid(self, node): mesh = BulletConvexHullShape() mesh.add_geom( GeomBuilder().add_wedge(self.color, self.base, self.top, self.width, LRotationf(*self.hpr)).get_geom() ) node.add_shape(mesh) return node
def add_solid(self, node): mesh = BulletConvexHullShape() mesh.add_geom(GeomBuilder().add_ramp(self.color, self.base, self.top, self.width, self.thickness, LRotationf(*self.hpr)).get_geom()) node.add_shape(mesh) return node
def add_solid(self, node): mesh = BulletConvexHullShape() mesh.add_geom(GeomBuilder().add_dome(self.color, self.center, self.radius, self.samples, self.planes, LRotationf(*self.hpr)).get_geom()) node.add_shape(mesh) return node
def add_solid(self, node): mesh = BulletConvexHullShape() mesh.add_geom( GeomBuilder() .add_dome(self.color, self.center, self.radius, self.samples, self.planes, LRotationf(*self.hpr)) .get_geom() ) node.add_shape(mesh) return node
def setup_shape(self, gnodepath, bone, pname): shape = BulletConvexHullShape() gnode = gnodepath.node() geom = gnode.get_geom(0) shape.add_geom(geom) node = BulletRigidBodyNode(self.name + pname) np = self.actor.attach_new_node(node) np.node().add_shape(shape) np.node().set_kinematic(True) np.wrt_reparent_to(bone) self.world.physics.attach_rigid_body(node) return np
def create_solid(self): node = BulletRigidBodyNode(self.name) mesh = BulletConvexHullShape() mesh.add_geom(self.geom.get_geom(0)) node.add_shape(mesh) return node