From da6fd24c9a8ca7fd8adc453f2ededf3f7bb7459b Mon Sep 17 00:00:00 2001 From: David Rose Date: Mon, 25 Jul 2005 23:55:03 +0000 Subject: [PATCH] scale SwitchCondition distance properly --- panda/src/egg/eggSwitchCondition.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/panda/src/egg/eggSwitchCondition.cxx b/panda/src/egg/eggSwitchCondition.cxx index 40245a197b..0a703a7371 100644 --- a/panda/src/egg/eggSwitchCondition.cxx +++ b/panda/src/egg/eggSwitchCondition.cxx @@ -79,4 +79,10 @@ write(ostream &out, int indent_level) const { void EggSwitchConditionDistance:: transform(const LMatrix4d &mat) { _center = _center * mat; + + LVector3d in = LVector3d(_switch_in, 0.0, 0.0) * mat; + LVector3d out = LVector3d(_switch_out, 0.0, 0.0) * mat; + + _switch_in = in.length(); + _switch_out = out.length(); }