Combine two RotateAboutAxis

Hi!
I’m trying to build a simple vertex shader that could make an object orbiting around a point and an axis.
I’t simple to rotate the object around its pivot (RotateAboutAxis using actor position as pivot)
I’t simple to revolve the object around an external point and make it flying around it…
BUT
the second revolution force the object to keep the same side towards the center… I’d like to combine the “revolution” and the “rotation”.

I tried to rotate first and then add the offset result to the “world position excluding shader offset” before using this new value as input for the second RotateAboutAxis that performs the revoltion.
I end up in a strange movement that resembles what I need, except for the fact that the object is severely deformed (it squashes and stretches).
I suppose I’m missing something :slight_smile:

you need to add the result of the first rotation to the result of the second rotation before feeding it into wpo as well. on top of adding it to the input of the second rotate position like you are already doing.

2 Likes

Thanks man!
I really missed to add two times the first offset.
It seems to work well now… thanks again! :slight_smile: