Beyond Blender Render/Make Something Move
Note on this chapter: The majority is taken up with descriptions of logic bricks. To fastforward to the work click Here
What's What?
editLet me explain how each logic brick works.
Sensors
editFirst there are sensors. These sense for something (such as keyboard presses or mouse clicks but not the neighbour's cat) and activate the controllers.
Actuator sensor
editThe actuator sensor detects if a particular actuator has been set off.
Always sensor
editThe always sensor basically means Always do this.
Collision sensor
editLike touch but works with properties instead of materials.
Delay sensor
editDelay sensor is activated after a set amount of time.
Joystick sensor
editSenses joystick movements and presses
Keyboard sensor
editThis detects keyboard presses.
Message sensor
editThis detects messages sent by the message actuator.
Mouse sensor
editDetects mouse input.
Near sensor
editDetects if an object with a certain property is nearby.
Property sensor
editDetects if a property on the current object is equal or between one or two equivalents.
Radar sensor
editDetects an object with a certain property along a certain access.
Random sensor
editTriggers so many times per second randomly.
Touch sensor
editDetects when this object touches another object with a certain material.
Controllers
editThese decide what to do with the signal from the sensors (such as activate a python script or activate an actuator).
Actuators
editThese do something with the signal from the controllers (such as move, start a game or pause this one).
Add Some Logic
editOkay, time to get to work. Make sure you are on the cube (or what ever you want your hero to be). Add four keyboard sensors. Next, add four and controllers. Finally add four movement actuators.
Now connect the top sensor with the top controller and the top controller with the top actuator. Then connect the second to the top to the second to the top and so on until they are all connected like so:
Next look at the top Keyboard Sensor. There should be a button with no text near the top. Click this button and then press the key you want to be Forward in the game. The most common keys for this purpose are "W" and "UpArrow". Then using the ones below you may set backwards, left and right.
Now your logic should look like this.
Now look down your actuator list. You'll see small fields with numbers in them. You can click them to edit their number. They control how much you are moving and in which direction. The fields go in the order of X axis, Y axis and Z axis. The fields with decimals in them are for motion and the fields with ° are for rotation (along the axis of your choice). Set all these to what you see in the above picture.
Note: If the L is on next to the fields that means that they will be Local directions for the object. If the L is not on they shall use global coordinates.