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
- 1 What's What?
- 1.1 Sensors
- 1.2 Controllers
- 1.3 Actuators
- 2 Add Some Logic
Let me explain how each logic brick works.
First there are sensors. These sense for something (such as keyboard presses or mouse clicks but not the neighbour's cat) and activate the controllers.
The actuator sensor detects if a particular actuator has been set off.
The always sensor basically means Always do this.
Like touch but works with properties instead of materials.
Delay sensor is activated after a set amount of time.
Senses joystick movements and presses
This detects keyboard presses.
This detects messages sent by the message actuator.
Detects mouse input.
Detects if an object with a certain property is nearby.
Detects if a property on the current object is equal or between one or two equivalents.
Detects an object with a certain property along a certain access.
Triggers so many times per second randomly.
Detects when this object touches another object with a certain material.
These do something with the signal from the controllers (such as move, start a game or pause this one).
Add Some Logic
Okay, 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.