This tutorial will teach you how to detect when a user clicks on an object. In this example there will be three objects in front of the user. When the user clicks on one of the objects, an arrow will appear above the object showing which one they selected.
This content is discussed in more detail in the reference section.
If you have trouble getting the code in this tutorial to work, you can find the complete example script pickingWithTheMouse.py in the \tutorials\picking directory.
Add the following code to it:
Run the script. As you can see, all it does is add three balls and places them in front of the user. It also adds an arrow but hides it since no ball is initially selected.