Rotating a Cube: Blender Game Engine Python



 

 
1.  Add a Keyboard Sensor

Note:
For this tutorial, I'm going to use python to rotate the default cube.  We are going to use one keyboard sensor to turn the rotation on and one keyboard sensor to turn the rotation off. 

Note:
Give each keyboard sensor a unique name.  The python script needs the sensor name to find it.

Select Cube:  Object mode
Buttons Window menu >> Logic (F4)
Sensors Add:
Keyboard
Name it:  On
Key:  X key



  
2.  Add a 2nd Keyboard Sensor

Note:
Give each keyboard sensor a unique name.  The python script needs the sensor name to find it.

Select Cube:  Object mode
Buttons Window menu >> Logic (F4)
Sensors Add:
Keyboard
Name it:  Off
Key:  C key


    




 
pageok