Now I try to connect to blender with P5 Glove through ctypes Module and running of Carl Kenner P5dll.dll Library, but I have a problem is the cyclic of Python Script, it must be called P5_Init () Function, which it cyclic very slowly. It makes reading the position X, Y, Z, and then apply the Function setPosition slowly and where there are discrepancies. I do not want use cyclic P5_Init () Function of the Script.
from ctypes import *
controller = GameLogic.getCurrentController()
scene = GameLogic.getCurrentScene()
objList = scene.objects
model = objList[‘OBCube’]
libc = windll.p5dll
P5_Init () makes this very slow Script Model is not a Realtime motion, because it is where included in the setPosition device has moved to another location, but the value back to the previous location.
number_g = libc.P5_GetCount()
x = c_float()
y = c_float()
z = c_float()
data_p = libc.P5_GetAbsolutePos(c_int(0), byref(x), byref(y), byref(z))
actMove = controller.actuators[“act”]
Understand that I am describing? I know little English.
How to resolve this problem for me. please