Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-02-25 20:19:30 +0300
committerCampbell Barton <ideasman42@gmail.com>2009-02-25 20:19:30 +0300
commita4ad52f1aaa1c8ed0d2f1345cbff99769f353ae9 (patch)
tree119ccf2f29b2e713ddbceafb63096e3e541ab95f /source/gameengine/Ketsji/KX_NearSensor.cpp
parent7fffb0b6302618049a35e6bacf0aeed70a47d8aa (diff)
New Pulse option for the collision sensor (off by default wont change existing logic)
Previously only the first collision would trigger an event (no collisions a negative event ofcourse) With the Pulse option enabled, any change to the set of colliding objects will trigger an event. Added this because there was no way to count how many sheep were on a platform in YoFrankie without running a script periodically. Changes in collision are detected by comparing the number of objects colliding with the last event, as well as a hash made from the object pointers. Also changed the touch sensors internal list of colliding objects to only contain objects that match the property or material. - pulse isnt a great name, could change this.
Diffstat (limited to 'source/gameengine/Ketsji/KX_NearSensor.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_NearSensor.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/gameengine/Ketsji/KX_NearSensor.cpp b/source/gameengine/Ketsji/KX_NearSensor.cpp
index 5b1df8b1fe1..a4aebdd8b6b 100644
--- a/source/gameengine/Ketsji/KX_NearSensor.cpp
+++ b/source/gameengine/Ketsji/KX_NearSensor.cpp
@@ -52,6 +52,7 @@ KX_NearSensor::KX_NearSensor(SCA_EventManager* eventmgr,
:KX_TouchSensor(eventmgr,
gameobj,
bFindMaterial,
+ false,
touchedpropname,
/* scene, */
T),