I wrote this tutorial recently, it is fairly in depth and covers how to use the mouse sensors.
Here is an extract from the tutorial:
If you’re serious about making a game or if you’re just making a mini game odds are you’re probably going to need to use the mouse in some sort of way.
In this tutorial I will be covering how to use the mouse sensors; retrieving information from them and then using that information to make certain things happen. Throughout the course of the tutorial we will make 8 blend files that will help you better understand using the mouse in the GE. These blend files are:
- Making the mouse appear in the GE
- Returning the mouse cursor co-ordinates (origin at the top right hand corner)
- Returning the mouse cursor co-ordinates (origin at the centre of the screen)
- Moving the camera with the mouse
- Move an object using the mouse
- Move an object to any spot on the screen instantaneously
- Move and object to any spot on the screen progressively
- Make objects spawn where the mouse is clicked and be able to move those objectsBefore reading this tutorial you should have a some what of an understanding of python in the GE.
Keep in mind this tutorial is on the theory on using mouse so don’t say “That camera movement script sucked” because I know it does and thats why I’m writing a follow on to this tutorial ‘Using the Mouse in the GE: Applications’ which will cover making actual systems that use the mouse in the GE.
Anyway, enough jiber jab here’s the link to the tutorial (hosted on my site, look around there if you want:)):
Using the Mouse in the GE: Theory
Hope you learn something new!