Combining transform.position to make interesting moving effects?
I am curious, is it possible to combine 2 or more transform.positions to create interesting effects? If so how would you combine 2 transform.position to make an effect on an object . For instance one that makes the object go from one point to another point and another transform.position that would make it go in a circular motion as to create an effect that the object is moving clockwise while shrinking and growing in size with the one point to another movement.
transform.position = new Vector3(Mathf.PingPong(Time.time * 5, 5) , 0f, 0f);
transform.position = new Vector3(Mathf.Cos(i) * (widthSet * i ), Mathf.Sin(i) * (heightSet * i), 0f);
Anyone out there can clarify this for me. I know there has to be a way- perhaps there is a unity method I don't know that someone can let me know to do something like that?
Set transform.position to the sum of the two vectors?
How would I write that? Do I just combine x's with x's, y's with y's and z's with z's?
Your answer
![](https://koobas.hobune.stream/wayback/20220612160551im_/https://answers.unity.com/themes/thub/images/avi.jpg)