I have a billboard tree in Blender made up of a single triangle. I applied an Array and Curve modifier to it to instance itself on the curve. I collapsed the trees and separated them by loose parts. Now I have hundreds of trees whose local origins are aligned to the global axis, which is not what I need.
In Unity, I have a billboarding script that automatically aligns the trees to the face the camera. However, this script does not work if the tree's origins (or pivot points as they're called in Unity), are not aligned to the normal of the tree's front face (or back face, it doesn't really matter because I can just negate the script's LookAt function).
Does anyone know if there's a script available for this or would be willing to write a script that can move all the origins of selected objects to each of the objects' individual face normals?
In the mean time, I'm going to look into Python and see if I can figure something out, but I don't have a lot of time and have an intermediate level C# background.
Edit 01 - Added image of what I'm looking for. The yellow arrow shows the re-alignment I'm seeking:
Edit 02 - I cannot reply due to the 50+ comment restriction. @X-27, I followed your instructions, but was met with the following strange tilt after parenting and enabling Face Duplication (not to mention the duplicates stabbing the parents):
The only way to mitigate the tilting is to re-orientate the child tree into some weird angle in order to get the duplicated trees to be standing up, but their rotations are still messed up. Judging by your screenshots, you also have the same problem with the duplicated blue trees being angled in an awkward manner. This is not what I need.
Regardless, I appreciate your suggestion, but I no longer need this solution and do not have time to learn Python and the Blender API to make a script myself.
@yhoyo, I think you may have misunderstood my question. I already know of the Properties Shelf rotation and the script you posted simply zeroes out the Z rotation, which is not what I needed.