PDA

View Full Version : Marker moves in x-direction


nachac
07-09-2010, 05:39 AM
Hi everybody,

I've got following problem:
I've got a marker and want to cause an action when this marker was moved into x-direction.

So how can I measure this marker was moved for e.g. 0.3 in x direction?
y- and z- direction are unimportant in this case. Is there any function?

Thanks for your help!

Jeff
07-12-2010, 04:41 PM
You could get check the position of the marker in Vizard every frame and if the x value is greater than 0.3 you could start the action.
def checkPosition():

if tracker.getPosition()[0] > 0.3:
#add some action here

vizact.ontimer(0,checkPosition)

nachac
07-26-2010, 04:15 AM
Thanks a lot!
This was exactly the answer I wanted to know ;-)