Browse Source

count rotation change as 'smooth position changed', re-compute forward axis after wrtReparent (both theoretical fixes, they seem like the right thing to do but I didn't see anything in particular that was broken because of them)

Darren Ranalli 18 years ago
parent
commit
ea98ccad42
1 changed files with 3 additions and 0 deletions
  1. 3 0
      direct/src/deadrec/smoothMover.cxx

+ 3 - 0
direct/src/deadrec/smoothMover.cxx

@@ -622,6 +622,7 @@ set_smooth_pos(const LPoint3f &pos, const LVecBase3f &hpr,
   }
   if (_smooth_hpr != hpr) {
     _smooth_hpr = hpr;
+    _smooth_position_changed = true;
     _computed_smooth_mat = false;
     _computed_forward_axis = false;
   }
@@ -814,5 +815,7 @@ handle_wrt_reparent(NodePath &old_parent, NodePath &new_parent) {
 
   compose_smooth_mat();
 
+  _computed_forward_axis = false;
+
   np.detach_node();
 }