소스 검색

set important smoothmover vars when setting lag

Joe Shochet 19 년 전
부모
커밋
a3af3b052c
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      direct/src/distributed/DistributedSmoothNode.py

+ 4 - 0
direct/src/distributed/DistributedSmoothNode.py

@@ -60,6 +60,10 @@ def activateSmoothing(smoothing, prediction):
             SmoothMover.setSmoothMode(SmoothMover.SMOn)
             SmoothMover.setPredictionMode(SmoothMover.PMOff)
             SmoothMover.setDelay(Lag)
+            # Set these other variables relative to the lag factor
+            SmoothMover.setExpectedBroadcastPeriod(Lag)
+            SmoothMover.setMaxPositionAge(Lag * 1.25)
+            SmoothMover.setResetVelocityAge(Lag * 1.5)
     else:
         # No smoothing, no prediction.
         SmoothMover.setSmoothMode(SmoothMover.SMOff)