Search Unity

Question How to make speed accelerate

Discussion in 'Visual Scripting' started by s314911, Apr 11, 2023.

  1. s314911

    s314911

    Joined:
    Apr 11, 2023
    Posts:
    2
    I am using mathf.pingpong and want to make it accelerate in speed. how should I do this
     
  2. halley

    halley

    Joined:
    Aug 26, 2013
    Posts:
    2,433
    Wrong forum for that question. And you're posting the same question in multiple areas. This is a question for just plain old scripting. Not Testing, not Visual Scripting.

    The
    Mathf.PingPong
    formula has nothing to do with speed. It's up to you to increment or decrement the t parameter at whatever speed you want. Whenever you want it to go faster, add more to the t parameter each cycle.