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 make ping pong accelerate

Discussion in 'Testing & Automation' started by s314911, Apr 11, 2023.

  1. s314911

    s314911

    Joined:
    Apr 11, 2023
    Posts:
    2
    I am using mathf ping pong but I want to make the speed accelerate< does anyone know how I could do this?
     
  2. halley

    halley

    Joined:
    Aug 26, 2013
    Posts:
    2,508
    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.