View Single Post
  #2  
Old 09-25-2014, 04:20 AM
Frank Verberne Frank Verberne is offline
Member
 
Join Date: Mar 2008
Location: Netherlands
Posts: 148
I am not sure what you are trying to do here. What do you mean by the pre-position of your haptic device? Do you mean the starting position of your haptic device? If so, then you should get the starting position once, outside of your timer loop. It would also be more helpful to know what you're trying to accomplish in general.

You can also try to change vizact.ontimer(0,geposition) to vizact.ontimer(1,getposition). Then the function would only be called every second, so changes of the position of your haptic device would be easier to detect. Finally, does the position of your haptic device gets registered properly? I.e. if you put your haptic device in a certain position, run the code, then move the haptic device and run the code again, does that change the value that you get?
Reply With Quote