mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
set important smoothmover vars when setting lag
This commit is contained in:
parent
65fca47e16
commit
a3af3b052c
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user