python - sending vector objetcs in blender over network -
how send vector object. trying send object's location in vector format on udp socket connection.
socket.sendto(self.cube.worldposition,server_addr)
but following error: typeerror: 'vector' not support buffer interface
how can achieve or there other way send position of object?
simply access values of vector,form list , send using pickle module
##player.worldposition vector x = player.worldposition[0] y = player.worldposition[1] z = player.worldposition[2] xyz = [x,y,z] #forming list ddd = pickle.dumps(xyz) #serialize list self.socket.sendto(ddd,self.server_address) #off goes
this worked me
Comments
Post a Comment