- Home /
Question by
sadowlight123 · Dec 04, 2018 at 12:19 PM ·
pingpong
ping pong to go from center
Hello I was wondering why this is not working , i want to do a pingpong effect relative to the y position I place the object in .
transform.position = new Vector3(transform.position.x, yCenter + Mathf.PingPong(Time.time * Speed, height) - height / 2f, transform.position.z);//move on y axis only
Behavior on this link: https://gyazo.com/e4d134afe67e00aacc8011eafe41837a
Comment