I’m trying to port an existing game from a custom iOS engine to unity.
However, all the objects in the game use a little bobby animation that relies on skewing the objectToWorld matrix. Bascially, the y axis bobs up and down, and a little left and right on a little sine wave, while the x and z axis remain static.
I can’t see how to do this in Unity with its limited transform system only supporting rotate, translate and scale.
The best solution I have come up with so far is to do the skewing in the vertex shader, and handling my own attachment code for child gameObjects (like gun turrets or particle systems). That is, I can’t make the a particle system a child of the parent, since the pivot won’t animate with the parent’s skewing.
Perhaps I’ve missed something and there really is a way to create a skew’d transform??