Simple Movement -- Blender 3D Game Engine








  
22
Left Movement
1.  Add a Keyboard Sensor: A key
2.  Add an AND Controller
3.  Add a Motion Actuator -- Servo Control
4.  Connect Keyboard Sensor (A key) >> AND Controller >> Servo Control
5.  Connect Keyboard Sensor (A key) >> NOR Controller

Note:

The Servo Control to stop the game object has already been set up.  To use it, all we have to do is connect the A key to the NOR Controller.

1.  Add a Keyboard Sensor: A key
Buttons Window menu >> Logic (F4)
Sensors Add
Keyboard Sensor
TRUE level triggering: Enabled
Key: A key

2.  Add an AND Controller
Buttons Window menu >> Logic (F4)
Controllers Add
AND Controller

3.  Add a Motion Actuator -- Servo Control
Buttons Window menu >> Logic (F4)
Actuators Add
Motion Actuator -- Servo Control
X-axis
linV = -10.0
Limit -- Max: 200.0
Limit -- Min:  -200.0
Y-axis
linV = 0.0
Limit not enabled
Z-axis
linV = 0.0
Limit -- Max: 0.0
Limit -- Min:  0.0

4.  Connect Keyboard Sensor (A key) >> AND Controller >> Servo Control
Buttons Window menu >> Logic (F4)
Pull wire from brass bump to brass dimple

5.  Connect Keyboard Sensor (A key) >> NOR Controller
Buttons Window menu >> Logic (F4)
Pull wire from brass bump to brass dimple


   
23
Right Movement
1.  Add a Keyboard Sensor:D key
2.  Add an AND Controller
3.  Add a Motion Actuator -- Servo Control
4.  Connect Keyboard Sensor (D key) >> AND Controller >> Servo Control
5.  Connect Keyboard Sensor (D key) >> NOR Controller

Note:

The Servo Control to stop the game object has already been set up.  To use it, all we have to do is connect the D key to the NOR Controller.

1.  Add a Keyboard Sensor: D key
Buttons Window menu >> Logic (F4)
Sensors Add
Keyboard Sensor
TRUE level triggering: Enabled
Key: D key

2.  Add an AND Controller
Buttons Window menu >> Logic (F4)
Controllers Add
AND Controller

3.  Add a Motion Actuator -- Servo Control
Buttons Window menu >> Logic (F4)
Actuators Add
Motion Actuator -- Servo Control
X-axis
linV =  10.0
Limit -- Max: 200.0
Limit -- Min:  -200.0
Y-axis
linV = 0.0
Limit not enabled
Z-axis
linV = 0.0
Limit -- Max: 0.0
Limit -- Min:  0.0

4.  Connect Keyboard Sensor (D key) >> AND Controller >> Servo Control
Buttons Window menu >> Logic (F4)
Pull wire from brass bump to brass dimple

5.  Connect Keyboard Sensor (D key) >> NOR Controller
Buttons Window menu >> Logic (F4)
Pull wire from brass bump to brass dimple


   
24
Start Game Engine

User Preference menu >> Game >> Start Game
or
P key
  

   




  
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.