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)

246086-plant.jpg

Plant with RotateAboutAxis using custom Pivots

246087-plantpivot.jpg

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

246088-plantobjpivot.jpg

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:

246089-plantpivotcorrection.jpg

Figured it out. You need to look at the PivotPainter2FoliageShader material function and use the UVs from the “Rebuild the Hierarchy” section.