Simple Movement -- Blender 3D Game Engine








  
12
Add a Motion Actuator -- Servo Control

Note:
This one Servo Control is used for all movement.  Movement.py uses the key being pressed to set/change the linear velocity and limits.

Note:
The Servo Control must be named move.  Can't be named Fred or Move or anything else.  The python code looks for a keyboard sensor attached to the controller named move.

Buttons Window menu >> Logic (F4)
Actuators Add
Motion Actuator
Servo Control
Name:  move
 
   
13
Connect Sensors >> Python Controller >> Servo Control

Buttons Window menu >> Logic (F4)
Pull wire from brass bump to brass dimple
 

   
14
Optional:  Add a Property named walking to the player

Note:
The Property must be named walking.  Can't be named Fred or Walking or anything else.  The python code looks for a Property named walking.

Note:
The Property named walking allows you to change the speed your player walks.  If there isn't a Property named walking, Movement.py will use the default walking speed.

Add Property to player named walking
Buttons Window menu >> Logic (F4)
Add Property button
Type:  Float
Name:  walking
Amount:  5.0




   




 
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.