So I’ve managed to create a cloud system which prodecurally generates cloud particles and volumetric cloud shapes, and it’s working great. I’m using my own custom made particle system but I’m having some trouble getting the billboard code to work exactly how I want…

On first impression everything seems to work fine, the billboards are set to always face the camera direction. BUT, the problem is:
- When you fly over the top of the cloud looking down, the particles spin around the z/forward axis making it look like there’s some sort of tornado going on, completely ruining the illusion of my pretty cloud ='[
I would like to find a solution that allows the billboard to face the camera along its z axis without causing the irritating z rotations. I’ve tried the following solutions so far with no luck;
Where childT is the transform of each cloud particle…
//Method 1
childT.LookAt(Camera.main.transform.position);
//Causes Z axis swirling
//Method 2
childT.LookAt(Vector3(childT.transform.position.x, childT.transform.position.y, Camera.main.transform.position.z));
//Causes slicing (looking straight down billboard) and incorrect Y rotations
//Method 3
childT.LookAt(Camera.main.transform.position);
childT.eulerAngles.z = 0;
//Same as Method 1
//Method 4
childT.rotation = Quaternion.LookRotation(new Vector3(Camera.main.transform.position.x, 0, Camera.main.transform.position.z) - new Vector3(childT.position.x, 0, childT.position.z));
//Causes swirling on the Y axis (rotating slices)
//Method 5
var point : Vector3 = Camera.main.transform.position;
point.y = 0.0;
childT.LookAt(point);
//Same as Method 1
Is this a gimbal lock thing?
Nothing seems to be working, all I want it to do is look at the camera and keep it’s original rotation around the z axis…even if that means the particle is technically upside down if you’ve completely gone over the top of it…whose gonna know, it’s a cloud puff…
Can’t have this swirling nonsense! >.> Getting me doooowwwn.
Would greatly appreciate any help from rotational mathy expert types =P
I’m also open to any solution that involves the shader taking care of the rotation via realigning the vertices of the geometry via screen space or something…maybe?