Someone
public text v1 · immutable
import socket
import OSC
cont=GameLogic.getCurrentController()
lampada = cont.getOwner()
def get_osc(host, port):
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.settimeout(0.5)
s.bind((host, port))
raw, addr = s.recvfrom(1024)
dec = OSC.decodeOSC(raw)
#s.close
return dec
xy = get_osc("localhost", 3333)
x = xy[0]
y = xy[1]
print x
print "-"
print y
lampada.setPosition([x,y,10.0])