How to break out a tuple value coming from UDP to TD

Hi there, I’m receiving data from a python script via UDP in the form if a tuple containing a 3float value. I’m using the UDP In Dat node to receive them successfully. However, the problem is that from there, I don’t really know how I can break each component into separate values. As you may see in the image, the tuple has 3 components that represents x,y and z; and my idea is to use these values to move sop meshes.

Additionally, I’m getting that “message” string at the very first row. Is there a way to get rid of that? Any advice would be greatly appreciated!

1|689x458

Cheers,
Jose

You’ll want to use the python struct module to decode the byte data in the callback. You can define the struct to be 3 floats, and then decode the byte array into 3 floats using that.

1 Like

Thank you Malcolm. It worked for me. I’ll post my script soon in case it helps and saves time to somebody else. Cheers!