|
Boreal Latte
Registered User
Join date: 15 Nov 2007
Posts: 104
|
10-01-2008 11:43
Hi. I have seen windmills in SL. They have a nice smooth turn, and it looks really good. I am sure they spin their wings using llTargetOmega, which is turning the wings on the client side, hence giving it a smooth look. However - those windmills do not take the SL wind into account. I want to make one that turns the wings to face the wind. That should be easy - right? Only - I cannot figure out how to do it.
If I use llTargetOmega then when I turn the mill up in the wind, the wings reset, which looks very disruptive.
My best effort at the moment is to let the propella be physical, and use the physical version of llTargetOmega to turn the propella with buoyancy =1, a llMoveToTarget to hold it in place, and holding it up against the wind using llLookAt. It seems like llLookAt does indeed make it face the wind, but also makes the propella turn to set its local x axist to point upwards. This again make a disruptive turn of the propella.
Are there any way in which I can make a construction in SL in which there are two axes of rotation, and both become smooth?
|
|
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
|
10-01-2008 13:31
Random suggestion... I think you can llTargetOmega a child prim, and that will spin relative to the rotation of the root prim. Not sure exactly how you would use this... I'd think the propeller blades would all have to be a single prim, which probably means using sculpties... yep, not sure if this'll work, but maybe this'll get you thinking in a direction that might 
|
|
Salvador Nakamura
http://www.sl-index.com
Join date: 16 Jan 2007
Posts: 557
|
10-01-2008 14:23
_____________________
SL-Index , providing an easy and affordable start in secondlife Rentals, Easy Setup Scripts, Freebies & Value Boxes www: http://sl-index.com HQ: http://slurl.com/secondlife/Immintel/212/14/100
|
|
Boreal Latte
Registered User
Join date: 15 Nov 2007
Posts: 104
|
Physics to the rescue
10-02-2008 01:56
I managed to get a smooth turn of both propella and gear now. As in some earlier cases, it is the physics engine of SL that bails me out. Propella is mounted in a bearing in the gearbox. The bearing is simply a hole in the gear box though which the axel of the propella lies. The propella is then turning due to the physical version of llTargetOmega. The gearbox is now also physical, and hinged on the top of a tower. The gearbox is turned using llSetTorque - this gives a smooth turn, and turning the bearing of the propella courses the physics engine in SL to also turn the propella as one would expect.
Downside - bearings need to be big, the whole construction becomes rather clunky to look at, but I expect that can be fixed by cosmetic building - where the actual bearings are transparent, while something that look like the bearings are phantom, but good looking.
And all this is now done with a minimal of scripting - (which of cause dequalifies it for this forum).
|