Pivot Painter 2.0 RotateAboutAxis

Hey there,

I have a plant which I have the pivots all set up to use the PivotPainter2FoliageShader for the realistic wind simulation. And it works just fine! But I’ve also set the shader up so that when the player comes close to it, the plant rotates by it’s root. When I try to RotateAboutAxis, I get weird results where every element of the plant rotates away from the player, but they stay at it’s pivot points.

Plant with Wind effect (using PivotPainter2FoliageShader)

Plant with RotateAboutAxis using custom Pivots

And here’s the rotation effect by simply using the **ObjectPivot **as the Pivot point:

But I don’t want to simply use the ObjectPivot to rotate the whole mesh. I’d like to add those secondary rotations to each element on the plant to try and get a better collision effect on the plant.
How do I get the other elements in the plant to stay on the main stock of the plant? like this:

You have to have two rotateAboutAxis nodes. one that has the pivot at 0,0,0 in local space and the other that has the pivot points at the branch origins. Then you just add the two rotations together.

I managed to get it working. It required having to re-build the hierarchy in the shader (similar to the PivotPainterWind node) and that gives individual influence control for branches and leaves.