1st Person Mouse Look -- Blender Game Engine


  
pageok



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

 

  
pageok