Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question How to change fixed timestep after set amount of time?

Discussion in 'Code Editors & IDEs' started by Cloudyclock, Jun 7, 2022.

  1. Cloudyclock

    Cloudyclock

    Joined:
    Jun 7, 2022
    Posts:
    3
    I was wondering how I could change the fixed timestep after like 30 seconds. I am trying to recreate snake game in unity and the speed of the snake is based off the fixed timestep. So to increase the difficulty of the game, I want the snake to move faster after an amount of time. Thanks for any responses
     
  2. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,343
    Code (csharp):
    1. Time.fixedDeltaTime = xxx;
    Where xxx is what you want the fixed timestep to be. Wrong subforum, by the way!
     
    Cloudyclock likes this.
  3. Cloudyclock

    Cloudyclock

    Joined:
    Jun 7, 2022
    Posts:
    3
    Thanks so much, I just started using unity so this helps so much! And what would the correct subforum be?
     
  4. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,343
  5. Cloudyclock

    Cloudyclock

    Joined:
    Jun 7, 2022
    Posts:
    3
    Thanks again, you have been so much help!