Sweep only works with Root component?

I had this problem, found this thread and decided to write a function that solves it

It calculates offset between current and desired root transform, sweeps all children by that amount, finds shortest sweep time, puts children back where they were and moves root by original offset multiplied by smallest sweep time

May be useful for other who had this problem, feel free to optimize it

1 Like