Hi,
I am trying to make a wind turbine that faces into the wind as the SL wind changes.
I have no problem getting the wind angle, rotating to face the wind, etc. Works perfectly.
The problem I have is with the spinning blades. I am using llTargetOmega to spin a link set - the root prim's rotation is ZERO_ROTATION. So, I'm using llTargetOmega to get the link set spinning about it's X axis (maybe Y - I don't have the script with me now.
The problem occurs when I try to combine the call to llSetRot to turn the spinning blades while the link set is already spinning using llTargetOmega (so, rotating the link set on the Z axis - into the wind). The moment I call llSetRot, the link set tilts and gets really messy. I have messed with using llAxisAngle2Rot, llSetRot, etc - no luck.
I think I need to somehow combine the rotation I am setting in lSetRot with llTargetOmega, but have no idea how to do that. I think things will appear choppy when I call llTargetOmega with the new rotation (if that's how to do it), so I'll check for a new wind direction every few minutes (instead of more often like a wind vein).
I found a tutorial where someone makes a windmill, but that's not much help since I run into the same problems. Besides, my setup is a lot simpler than the windmill in the tutorial since I only need to rotate one linkset (the tutorial rotated a couple of link sets).
Would appreciate some help! Thanks -2fast