Ver Fonte

added comment

Greg Wiatroski há 21 anos atrás
pai
commit
179d0c7e0c
1 ficheiros alterados com 1 adições e 0 exclusões
  1. 1 0
      panda/src/pgraph/nodePath.cxx

+ 1 - 0
panda/src/pgraph/nodePath.cxx

@@ -916,6 +916,7 @@ get_hpr() const {
   nassertr_always(!is_empty(), LVecBase3f(0.0f, 0.0f, 0.0f));
   nassertr_always(!is_empty(), LVecBase3f(0.0f, 0.0f, 0.0f));
   CPT(TransformState) transform = get_transform();
   CPT(TransformState) transform = get_transform();
   nassertr(transform->has_hpr(), LVecBase3f(0.0f, 0.0f, 0.0f));
   nassertr(transform->has_hpr(), LVecBase3f(0.0f, 0.0f, 0.0f));
+  // now that we are range checking fields we must clamp this
   LVecBase3f hpr = transform->get_hpr();
   LVecBase3f hpr = transform->get_hpr();
   hpr[0] = fmod(hpr[0], 360);
   hpr[0] = fmod(hpr[0], 360);
   hpr[1] = fmod(hpr[1], 360);
   hpr[1] = fmod(hpr[1], 360);