Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Bolt Help: Delayed Input

Discussion in 'Visual Scripting' started by zapman502_unity, Aug 24, 2020.

  1. zapman502_unity

    zapman502_unity

    Joined:
    Jul 13, 2020
    Posts:
    4
    So I am trying out a simple Jump graph but it has some weird Input lag. Sometimes when I press the button it works, other times it just doesn't see the input. I attached a screenshot of the bolt graph I made incase something I did there is causing the seemingly random input reading. Is it just performance issues with bolt?
     

    Attached Files:

  2. Ex-Crow

    Ex-Crow

    Joined:
    Aug 14, 2020
    Posts:
    111
    Your issue is the use of Fixed Update. Input detection should always happen in Update.
     
    vinurd and zapman502_unity like this.
  3. guybro_thunderboots

    guybro_thunderboots

    Joined:
    Aug 27, 2015
    Posts:
    40
    FixedUpdate isn't guaranteed to run as frequently as Update, so that's probably why. You'll want to use another way of detecting inputs.

    Conveniently, there's a short Unity tutorial that handles jumping inputs here that you might want to watch:
     
    vinurd and zapman502_unity like this.
  4. zapman502_unity

    zapman502_unity

    Joined:
    Jul 13, 2020
    Posts:
    4
    Thank you both Ex-Crow and guybro_thunderboots for your replies! I will use a regular update for input detection then. The video is also very helpful, thanks.
     
unityunity