Blender Game Engine Overview | Page 7

Blender org
to only detect objects with a given material or property.
It shares a lot of buttons and fields with Radar sensor.
The X-Ray Mode button make it x-ray, it sees through objects that doesn’t have the property or material
specified in the filter field.
GameLogic python API.

Touch sensor

Touch sensor
The Touch sensor sends a positive pulse when the object is in contac t with another object. The MA field is
for filtering materials. Only contact with the material in t his field will generate a positive pulse. Leave

blank for touch with any object. The positive pulse is sent on collision and the negative pulse is sent once
the objects are no longer in contact. For a continuous pulse wh ile they are in contact use “True Pulse
triggering”.
GameLogic python API.



Controllers
The controllers are the bricks that collect data sent by the sensors. There are eight ways to process the
input:
 AND
 OR
 XOR
 NAND
 NOR
 XNOR
 Expression
 Python
When a sensor is activated it sends out a positive pulse and when it is deactivated it sends out a negative
pulse. The controllers’ job is to check and combine these pulse s to trigger the proper response.

Controller Comparison table
This table is supposed to give a quick overview of the controller types. The first column, input, represents
the number of positive pulses sent from the connected sensors. The following columns represent each
controller’s response to those pulses. True meaning the conditions of the controller is fulfilled and the
actuators it is connected to will be activated, false meaning the controller’s conditions are not met and
nothing will happen. Please consult the sections further down for a more detailed description of each
controller.
Note
It is assumed that more than one sensor is connected to the controller. For onl y one

sensor, consult the “All” line.

Positive sensors Controllers
AND OR XOR NAND NOR XNOR
None False False False True True True
One False True True True False False
Multiple, not all False True False True False True
All True True False False False True


AND Controller
The AND controller is the default type when you create a new controller. This is because it is the most
common controller and it works well for just pass a sensor directly to an actuator (which cannot be done
without a controller).
An AND controller activates the actuators it is connected to only if all the sensors connected to it are
positive. If only one sensor is connected to it, the actuators wil l be activated as soon as the sensor is
triggered. If more sensors are connected they all have to be activated at the same time. This is where the
name comes from. If there are two sensors, “sensor1” and “sens or2”, connected to the controller
both sensor1 AND sensor2 have to be active at the same time.

Example
You want to make a menu button. When the player clicks the button he is trans ferred to the next scene.
On the menu button you set up two Mouse Sensors, a Mouse over sensor and a Left button sensor. Both
are connected to the same AND controller, which is connected to
Continue reading on your phone by scaning this QR Code

 / 23
Tip: The current page has been bookmarked automatically. If you wish to continue reading later, just open the Dertz Homepage, and click on the 'continue reading' link at the bottom of the page.