Jack Cohen
Junior Member
Join date: 4 Jun 2004
Posts: 2
|
07-16-2004 16:53
I am trying to create a simple wether vein that will rotate around a z axis until its facing the direction that the wind is blowing. I have been able get the wind vector by using llWind(<0.0,0.0,0.0>  . But When I plug that into a rotation API my object flips into arbitrary positions. Does anyone know you to get an object to rotate and point the wind direction? Thanks in advance for any assistance. Jack Cohen
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
07-17-2004 01:42
the easy way is to use llLookAtTarget
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river. - Cyril Connolly
Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence. - James Nachtwey
|
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
|
07-17-2004 01:56
From: someone Originally posted by Strife Onizuka the easy way is to use llLookAtTarget Yup, here's the full snippet: // Get the wind direction at my pos. vector windDirection = llWind(ZERO_VECTOR); vector myPos = llGetPos(); llLookAt(myPos + windDirection, 1, 1);
|
Jack Cohen
Junior Member
Join date: 4 Jun 2004
Posts: 2
|
Thank You!!!
07-17-2004 09:28
Hey that code snippet worked great. It didn't work on my original object. It kept flipping arbitrary. So i created a new one and it works perfectly!
Thank you very much for you help!
Jack Cohen
|