def tuple_as_vec(xyz):
        """
        Generates a Vector3 from a tuple or list.
        """
        vec = Vector3()
        vec[0] = xyz[0]
        vec[1] = xyz[1]
        vec[2] = xyz[2]
        return vec