1st Person Mouse Look -- Blender Game Engine


  

 



5.  Add MouseLook.py to the Text Editor

Note:
If you downloaded either the starting blend or the finished blend, you can find MouseLook.py in the Text Editor.  

Download:

Text Editor menu >> Text >> Open
Rename MouseLook.txt to MouseLook.py

 

6.  Add a Mouse Movement Sensor named MouseLook to Camera

Note:
Sensor must be named MouseLook.  Can't be named Fred or mouselook or anything else.  The python code looks for sensor attached to the camera named MouseLook.

Select Camera:  Object mode

Buttons Window menu >> Logic (F4)
Sensors
Add
Mouse
Movement
Name the Mouse Movement Sensor
Name it: MouseLook

 
 
7.  Add a Python Controller:  Use MouseLook.py

Camera selected:  Object Mode

Buttons Window menu >> Logic (F4)
Controllers
Add
Python
Script:  MouseLook.py

 

  
The Blender 3D and game engine tutorials were created as a series of step by step instructions and help you create computer games. Use the tutorials to make casual video games, First Person Shooter games, role playing games, racing simulation games and more. Use the tutorials as a self paced learning tool to model and program your own three-dimensional world and then play on your computer.