Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public float x = 2;
- public float y = 1;
- void FixedUpdate()
- {
- transform.position = new Vector3(Mathf.PingPong(Time.time, x) - y, transform.position.y, transform.position.z);
- }
Advertisement
Add Comment
Please, Sign In to add comment