set important smoothmover vars when setting lag

This commit is contained in:
Joe Shochet 2006-12-21 09:58:46 +00:00
parent 65fca47e16
commit a3af3b052c

View File

@ -60,6 +60,10 @@ def activateSmoothing(smoothing, prediction):
SmoothMover.setSmoothMode(SmoothMover.SMOn) SmoothMover.setSmoothMode(SmoothMover.SMOn)
SmoothMover.setPredictionMode(SmoothMover.PMOff) SmoothMover.setPredictionMode(SmoothMover.PMOff)
SmoothMover.setDelay(Lag) 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: else:
# No smoothing, no prediction. # No smoothing, no prediction.
SmoothMover.setSmoothMode(SmoothMover.SMOff) SmoothMover.setSmoothMode(SmoothMover.SMOff)