Moving an object with dependency of it's rotation

Hi guys,

So I’m spawning objects in a circle and want to move them further away from the middle point of the circle. Every object is facing a specific direction (away from the middle point).
Now I want to increase the diameter of the circle by moving all objects away from the middle point (in the direction they are facing)

I tried Vector.up but that was obviously not working… So I tried Vector3.up with localPosition but that wasn’t working either. Do you have any suggestions what to use? I stumbled across Transform.InverseTransformVector and Transform.TransformDirection.

They sound pretty good but I have no clue how to use them. Does anyone have an idea?

BTW: I don’t want finished copy-paste code. I want to understand this s$$t :wink: so I can use it myself in other projects :slight_smile:

Thanks for your help.

Firstly, create a circle equation keeping center = middle point and radius = distance from the middle point. Now from that equation define x in terms of y say f(y) or y in terms of x say f(x).
It’s your choice to use either (f(y), y) or (x, f(x)); I’m explaining using (x,f(x)).
Now, Instantiate at objects on that circle by providing any x value on that circle and f(x) will decide the corresponding value of y. By varying the value of x, you can spawn objects on that circle at different positions. Make each object face to the center by using Unity’s LookAt() method. Now, transform using localPosition axis(facing towards center) to move away from the center.