diff options
author | Benoit Bolsee <benoit.bolsee@online.be> | 2008-04-06 02:08:15 +0400 |
---|---|---|
committer | Benoit Bolsee <benoit.bolsee@online.be> | 2008-04-06 02:08:15 +0400 |
commit | 9edb6c7510742fb9461be179549552374b8aabc9 (patch) | |
tree | ba79990c5dd88eeb1e4438bc52d8167b9c076662 /source/gameengine/Ketsji/KX_RadarSensor.cpp | |
parent | 6e5984ce399ec18b6d91dcd19f9ae4ac705d9fbf (diff) |
Patch #8740: enable negative axis radar sensor
Diffstat (limited to 'source/gameengine/Ketsji/KX_RadarSensor.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_RadarSensor.cpp | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/source/gameengine/Ketsji/KX_RadarSensor.cpp b/source/gameengine/Ketsji/KX_RadarSensor.cpp index 5d56eaabb5a..45379f93b54 100644 --- a/source/gameengine/Ketsji/KX_RadarSensor.cpp +++ b/source/gameengine/Ketsji/KX_RadarSensor.cpp @@ -127,27 +127,48 @@ void KX_RadarSensor::SynchronizeTransform() // depends on the radar 'axis' switch (m_axis) { - case 0: // X Axis + case 0: // +X Axis { MT_Quaternion rotquatje(MT_Vector3(0,0,1),MT_radians(90)); trans.rotate(rotquatje); trans.translate(MT_Vector3 (0, -m_coneheight/2.0 ,0)); break; }; - case 1: // Y Axis + case 1: // +Y Axis { MT_Quaternion rotquatje(MT_Vector3(1,0,0),MT_radians(-180)); trans.rotate(rotquatje); trans.translate(MT_Vector3 (0, -m_coneheight/2.0 ,0)); break; }; - case 2: // Z Axis + case 2: // +Z Axis { MT_Quaternion rotquatje(MT_Vector3(1,0,0),MT_radians(-90)); trans.rotate(rotquatje); trans.translate(MT_Vector3 (0, -m_coneheight/2.0 ,0)); break; }; + case 3: // -X Axis + { + MT_Quaternion rotquatje(MT_Vector3(0,0,1),MT_radians(90)); + trans.rotate(rotquatje); + trans.translate(MT_Vector3 (0, m_coneheight/2.0 ,0)); + break; + }; + case 4: // -Y Axis + { + MT_Quaternion rotquatje(MT_Vector3(1,0,0),MT_radians(-180)); + trans.rotate(rotquatje); + trans.translate(MT_Vector3 (0, m_coneheight/2.0 ,0)); + break; + }; + case 5: // -Z Axis + { + MT_Quaternion rotquatje(MT_Vector3(1,0,0),MT_radians(-90)); + trans.rotate(rotquatje); + trans.translate(MT_Vector3 (0, m_coneheight/2.0 ,0)); + break; + }; default: { } |