PDA

View Full Version : Help with using a pointer to hit a sensor.


Lynnifer
03-30-2012, 03:59 PM
I am working on updating a program for the use in a new experiment for my lab, and my knowledge of both Python and Vizard is still limited. I have created a pointer that is based on the user's hand position (a "+" symbol pointer) as read by the magnetic tracking system Flock of Birds. A sensor on the head controls the movement of the entire background (moving the background in space) and the movement of the sensor on the hand controls the pointer. In the original program, the movement of the head was used in the program to designate whether the targets on the background where hit or not ( viz.get(viz.HEAD_YAW) and viz.get(viz.HEAD_PITCH) were assigned to the names currentYaw and currentPitch and then fed into the equation to see if the target was hit).

What I need is to be able to use the pointer's location to say whether the target is hit or not. I cannot figure out how to do so. For experimental purposes, I only need the pointer to be in the correct position on the x and y axis, the z axis for the hand does not matter to the experimental rationale. I am attaching a text document with the program. Any advice/suggestions on how I might accomplish this would be greatly appreciated. Thank you.