Stops moving when two stimuli meets

  • Please post actual formatted code as per Please surround python code with backticks rather than screenshots. It makes it much harder to suggest changes.
  • You really need to avoid absolute paths and shift to using relative ones.
  • Regardless, don’t use Windows-style \ separators, they can have special meaning in Python strings. Use / instead.

Your stimuli are doing exactly what your code tells them to do (keep moving in response to keypresses). If you want them to stop at some point, you need to include the constraints in the code. e.g. don’t increment the x coordinate if it exceeds some boundary value.

Alternatively, you might be able to use the .contains() method of your stimuli to detect collisions: http://www.psychopy.org/api/visual/imagestim.html#psychopy.visual.ImageStim.contains