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

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -