title: Calculate cooldown between new platform spawning. Unity
body: <p>I'm making endless runner. I made platform spawning script where i calculate the cooldown between spawning each new platform depends on speed and platform length. I'm using this formula:</p>
  <pre><code>spawnCooldown = platformLenght * (1 / platfowmMovingSpeed);
  </code></pre>
  <p>this finds how far it moves in 1 second. BUT! It dosen't work as i want and i dont know why.</p>
  <blockquote>
  <p>For example: PlatfromLenght = 4; platformMovingSpeed = 20;
  spawnCooldown = 4 * (1/20); spawnCooldown = 0.2sec.</p>
  </blockquote>
  <p>For this it works fine but when speed is 17 or 23 or another value that Not 10 or 20, i get empty space between platforms. i would be appreciated for any ideas about that.</p>