working with speed and/or time

posted to: Rotating Turret

when working with things like 'speed' and or 'time' could/should we be including "Time.deltatime" so speed is the same regardless of the system it is on?



moveX += Input.GetAxis("Mouse X") * (speed * Time.deltatime);
  • Jonathan Gonzalez(jgonzalez) replied
    Yes you can. By adding in the Time.deltaTime you base the movement off seconds instead of frames. In that case you wouldn't run into issues with one computer being able to run the game faster/slower.