Game Logic: setTimeScale

setTimeScale(float)
  • Set the multiplier between real and simulation time

float Type:
  • float number
Range:
  • 0.00 to ???
Note:
  • The default Time Scale is 1.0
     
  • A Time Scale of less than 1.0 means that the simulation is going slower than real-time
     
  • A Time Scale of greater than 1.0 means that the simulation is going faster than real-time
Sample Code

################## set the multiplier between real and simulation time
  

# import bge
import bge

# set the simulation time to half real time
bge.logic.setTimeScale(0.5)