Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Weathervane?

Psyra Extraordinaire
Corra Nacunda Chieftain
Join date: 24 Jul 2004
Posts: 1,533
11-18-2004 18:58
A while ago I saw that someone had made a script that spawned a grid over an entire zone of small arrows every 10m that pointed in the wind direction. Viewed from above it was neat to awtch the wind patterns.

Anyways.... is there perhaps a script on a timer out there to point an object towards the wind direction to make a weathervane object? Would be very nice for the ranch I'm helping work on. :D
_____________________
E-Mail Psyra at psyralbakor_at_yahoo_dot_com, Visit my Webpage at www.psyra.ca :)

Visit me in-world at the Avaria sims, in Grendel's Children! ^^
Rysidian Rubio
Ruby Red Head
Join date: 14 Jan 2004
Posts: 263
11-18-2004 20:15
Here is a script that will simply make the object turn to face the wind direction every 2 seconds.
CODE
default
{
state_entry()
{
llSetTimerEvent(2);
}

timer()
{
llLookAt(llWind(<0,0,0>),10,10);
}
}
Just make sure that it is in the root prim of an object. If this doesn't work please let me know as I am writing this from work, and there may be something I am forgetting.
Tiger Crossing
The Prim Maker
Join date: 18 Aug 2003
Posts: 1,560
11-19-2004 08:26
A weathervane was my very first build in SL! :)
_____________________
~ Tiger Crossing
~ (Nonsanity)
DoteDote Edison
Thinks Too Much
Join date: 6 Jun 2004
Posts: 790
11-19-2004 13:41
I've seen a pretty cool weather gadget around Phobos... I believe it belonged to Hank Ramos? Anyway, in addition to pointing into the wind, it included an anemometer. That's the thing that spins around measuring windspeed.
Aestival Cohen
half pint half drunk up
Join date: 2 Sep 2004
Posts: 311
11-19-2004 13:50
We have wind?

Really?

What's it do?
_____________________
=^.^= =^.^= =^.^= =^.^= =^.^= =^.^= =^.^= =^.^= =^.^= =^.^=
Luverly FLICKR photos!
=^.^= =^.^= =^.^= =^.^= =^.^= =^.^= =^.^= =^.^= =^.^= =^.^=
Cross Lament
Loose-brained Vixen
Join date: 20 Mar 2004
Posts: 1,115
11-19-2004 14:47
From: Aestival Cohen
We have wind?

Really?

What's it do?


Um... blows? :D
_____________________
- Making everyone's day just a little more surreal -

Teeple Linden: "OK, where did the tentacled thing go while I was playing with my face?"
Cross Lament
Loose-brained Vixen
Join date: 20 Mar 2004
Posts: 1,115
11-19-2004 15:04
Hehe. :D

CODE
// w00t stupid tumbleweed script!
// Rez a wood ball and drop this innit.
// Now I just need a tumbleweed texture that isn't teh suck. ^^

float tweakvalue = 0.5 ; // The fraction of the wind speed you want the tumbleweed to move at.

default
{
state_entry()
{
llSetStatus( STATUS_PHYSICS | STATUS_DIE_AT_EDGE, TRUE ) ;
llCollisionSound( "", 0.0 ) ; // I wish people would remember this!

llSetTimerEvent( 2 ) ;
}

timer()
{
llApplyImpulse( llWind( ZERO_VECTOR ) * ( tweakvalue * llGetMass() ), FALSE ) ;
}
}
_____________________
- Making everyone's day just a little more surreal -

Teeple Linden: "OK, where did the tentacled thing go while I was playing with my face?"
Aestival Cohen
half pint half drunk up
Join date: 2 Sep 2004
Posts: 311
11-19-2004 16:24
From: Cross Lament
Um... blows? :D


:-P

But does this mean people could make real working sail boats? How about kites?
_____________________
=^.^= =^.^= =^.^= =^.^= =^.^= =^.^= =^.^= =^.^= =^.^= =^.^=
Luverly FLICKR photos!
=^.^= =^.^= =^.^= =^.^= =^.^= =^.^= =^.^= =^.^= =^.^= =^.^=
Cross Lament
Loose-brained Vixen
Join date: 20 Mar 2004
Posts: 1,115
11-19-2004 16:43
From: Aestival Cohen
:-P

But does this mean people could make real working sail boats? How about kites?


Oooh! A kite! I wanna make one, now. :)

Probably what you'd want to do is have the kite object use llSetHoverHeight() or something along those lines, to get it up in the air, then ... well, heck, even my tumbleweed script would probably cause it to blow around. :)

Ummm... now, constraining the motion of the kite (so it doesn't fly away), and keeping it oriented correctly (pointing its bottom toward the user) could be an interesting exercise... okay, now I hafta do this when I get home tonight. :D

BTW, Aestival is a neat name. I like that word. ^^
_____________________
- Making everyone's day just a little more surreal -

Teeple Linden: "OK, where did the tentacled thing go while I was playing with my face?"
Aestival Cohen
half pint half drunk up
Join date: 2 Sep 2004
Posts: 311
11-19-2004 17:39
Thank you! *^^*

/me wants a kite!
_____________________
=^.^= =^.^= =^.^= =^.^= =^.^= =^.^= =^.^= =^.^= =^.^= =^.^=
Luverly FLICKR photos!
=^.^= =^.^= =^.^= =^.^= =^.^= =^.^= =^.^= =^.^= =^.^= =^.^=
Upshaw Underhill
Techno-Hobbit
Join date: 13 Mar 2003
Posts: 293
11-19-2004 17:50
Hey Cross,
I started on a line of kites a while back.
Hopefully I can catch up with you in-world later.

L8r,
UU
Konigmann Lippmann
Registered User
Join date: 15 Jun 2004
Posts: 40
01-27-2005 21:05
I was just fooling with a similar script the other day when I realized that the wind never has a value in the Z force... I guess I'm not gonna be catching a thermal anytime soon. :(
Elle Pollack
Takes internets seriously
Join date: 12 Oct 2004
Posts: 796
01-28-2005 06:23
I tried making a physics-based anemometer once becauseI was curious about the wind...I wanted to see if the wind in SL had any physical force.

I still don't know if it has force and I have a weird spinny gadget gathering dust in my inventory.

But basicly, it's four cups on sticks attached with a hinge to a pole, with a base that has directional points indicated on it. It's scripted to display the result of llGetWind in floating text (updated every 5 seconds or so) and I threw in a particle generator for a visual reference of wind direction because I didn't know how to derive direction from the llWind function.

What is the unit of velocity in SL anyway? Meters per second?
Eggy Lippmann
Wiktator
Join date: 1 May 2003
Posts: 7,939
01-28-2005 07:34
Yeah, we have wind and clouds, they are based on cellular automata.
http://en.wikipedia.org/wiki/Cellular_automata
Cross Lament
Loose-brained Vixen
Join date: 20 Mar 2004
Posts: 1,115
01-28-2005 13:52
From: Elle Pollack
I tried making a physics-based anemometer once becauseI was curious about the wind...I wanted to see if the wind in SL had any physical force.

I still don't know if it has force and I have a weird spinny gadget gathering dust in my inventory.

But basicly, it's four cups on sticks attached with a hinge to a pole, with a base that has directional points indicated on it. It's scripted to display the result of llGetWind in floating text (updated every 5 seconds or so) and I threw in a particle generator for a visual reference of wind direction because I didn't know how to derive direction from the llWind function.

What is the unit of velocity in SL anyway? Meters per second?


Wind has velocity, but applies no force to anything, unless those anythings are scripted to push themselves around based on the wind velocity. llWind returns a vector representing the wind velocity (speed and direction). If you want a unit vector (ie. direction only, magnitude of 1.0), use llVecNorm( llWind() ). :)

As far as I know, everything in SL is metricish, so yeah, meters per second. :D

Edit: Oops, applies no force to anything except particles that are flagged with PSYS_PART_WIND_MASK, I should say. :D
_____________________
- Making everyone's day just a little more surreal -

Teeple Linden: "OK, where did the tentacled thing go while I was playing with my face?"
2O3 Oz
Registered User
Join date: 24 Jan 2005
Posts: 1
01-29-2005 22:36
is the good for a cape ( when flying around )
Cross Lament
Loose-brained Vixen
Join date: 20 Mar 2004
Posts: 1,115
01-30-2005 16:38
Hey wow... you probably could make a pretty decent 'wind-blown' cape using wind-responsive particles. :D
_____________________
- Making everyone's day just a little more surreal -

Teeple Linden: "OK, where did the tentacled thing go while I was playing with my face?"
Caoimhe Armitage
Script Witch
Join date: 7 Sep 2004
Posts: 117
02-09-2005 22:12
From: Cross Lament
Wind has velocity, but applies no force to anything, ...

Edit: Oops, applies no force to anything except particles that are flagged with PSYS_PART_WIND_MASK, I should say. :D


It actually applies force to objects that are light enough. I made a bunch of butterflies that flit using llApplyImpulse in a random direction. The wind intoduced a strong bias to their motion :)

- C
Vintnerd Oud
Registered User
Join date: 25 Jun 2005
Posts: 7
08-02-2005 03:00
From: Rysidian Rubio
Here is a script that will simply make the object turn to face the wind direction every 2 seconds.
CODE
default
{
state_entry()
{
llSetTimerEvent(2);
}

timer()
{
llLookAt(llWind(<0,0,0>),10,10);
}
}
Just make sure that it is in the root prim of an object. If this doesn't work please let me know as I am writing this from work, and there may be something I am forgetting.


yea yea, bump :^)

Actually, when I just tried this, the prim sort of flopped over on it's side at a wierd angle. What would be nice is if you could lock the X and Y axis rotations, and just have it rotate around the Z (up/down) axis.
DoteDote Edison
Thinks Too Much
Join date: 6 Jun 2004
Posts: 790
08-03-2005 18:00
Problem is, llLookAt() points the Z-axis. So, the simple solution is to build your object with that in mind and you'll get the same result that you're looking for. Whichever axis becomes the new "Up" axis will become the pivot, with the remaining two locked.
Nyoko Salome
kittytailmeowmeow
Join date: 18 Jul 2005
Posts: 1,378
kites, -very- neat idea!! :)
08-03-2005 18:59
how about 'hot-air' ballooning?? would that be possible? does the atmospheric model include barometric densities?
_____________________

Nyoko's Bodyoils @ Nyoko's Wears
http://slurl.com/secondlife/Centaur/126/251/734/
http://home.comcast.net/~nyoko.salome2/nyokosWears/index.html

"i don't spend nearly enough time on the holodeck. i should go there more often and relax." - deanna troi
Tiger Crossing
The Prim Maker
Join date: 18 Aug 2003
Posts: 1,560
08-04-2005 07:22
The wind in SL is highly erratic and changes constantly. It's not really good for much. It's like a feature they started to add, got wrong, but never bothered to fix/finish since it's not used for much and the errors are all that obvious... Until you try to USE the wind for something.

And the wind has no connection to physics whatsoever. Only trees and any script that asks for it will be affected by "wind".
_____________________
~ Tiger Crossing
~ (Nonsanity)