Change font size
It is currently Thu May 23, 2013 1:43 am

Forum rules


Image



Post a new topicPost a reply Page 2 of 2   [ 15 posts ]
Go to page Previous  1, 2
Author Message
 Post subject: Re: llWind & Prim Rotation on z axis
PostPosted: Mon Jun 18, 2012 9:06 pm 
User avatar

Joined: Fri Mar 26, 2010 12:11 pm
Posts: 47
Location: Belgium / Brussels
Well it is twisted all these rotations.
Also interested in your approach.
From my side I found four different approaches on various forums.
... between one another using atan.

ok, if i undertand, i can use llVecNorm to optimise a bit the script ?

_________________
Webmaster @ digitalconcepts.free.fr & digigrids.free.fr


Top
 Profile  
 
 Post subject: Re: llWind & Prim Rotation on z axis
PostPosted: Sun Jun 24, 2012 9:57 am 
User avatar

Joined: Fri Mar 26, 2010 12:11 pm
Posts: 47
Location: Belgium / Brussels
I hope to always get an answer for:
Code:
I would like to know the min/max value for ConfigurableWind.

Variables are:
strength
avg_strength
avg_direction
var_strength
var_direction rate_change

_________________
Webmaster @ digitalconcepts.free.fr & digigrids.free.fr


Top
 Profile  
 
 Post subject: Re: llWind & Prim Rotation on z axis
PostPosted: Sat Jul 07, 2012 4:17 am 

Joined: Fri Apr 13, 2012 1:19 am
Posts: 23
I would recommend NEVER using atan to do this sort of problem. Tangents go through infinities and arc tangents return a confusing set of angles depending on what quadrant the vector is in. Finding your answer doing only vector operations has none of these issues. Vectors can point straight north or east without getting infinities. llAxes2Rot is your friend!
My sample code had only one call to llVecNorm, and it is required because llAxes2Rot requires unit normal vectors. No additional and no fewer calls to llVecNorm are possible, so there is no additional optimization possible.


Top
 Profile  
 
 Post subject: Re: llWind & Prim Rotation on z axis
PostPosted: Wed Oct 17, 2012 8:47 am 
User avatar

Joined: Fri Mar 26, 2010 12:11 pm
Posts: 47
Location: Belgium / Brussels
Why make it simple when it can be complicated ... :P
Code:
default
{
    state_entry()
    {
        llSetTimerEvent(1.0);
    }
   
    timer()
    {
        llSetRot(llRotBetween(<-1,0,0>,llWind(ZERO_VECTOR)));
    }
}

_________________
Webmaster @ digitalconcepts.free.fr & digigrids.free.fr


Top
 Profile  
 
 Post subject: Re: llWind & Prim Rotation on z axis
PostPosted: Wed Oct 17, 2012 8:59 am 
User avatar

Joined: Fri Mar 26, 2010 12:11 pm
Posts: 47
Location: Belgium / Brussels
I set the module "ConfigurableWind" like this hoping that automatically varies the strength and direction of the wind but it's nothing ...
Code:
[Wind]
    enabled = true
    wind_update_rate = 150
    wind_plugin = ConfigurableWind
    avg_strength  = 3.0
    avg_direction = 90.0
    var_strength  = 3.0
    var_direction = 180.0
    rate_change = 1.0

The only way I've found to vary the strength and direction of the wind is llSetWindParam use in a script with a timer.

I wonder if this is normal ... ?

I still have not found the min/max values allowed for:
Code:
    wind_update_rate = ?
    avg_strength  = ?
    avg_direction = (probably +/- 360)
    var_strength  = ?
    var_direction = (probably +/- 360)
    rate_change = ?

Thank you in advance for any information about this :)

_________________
Webmaster @ digitalconcepts.free.fr & digigrids.free.fr


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 2 of 2   [ 15 posts ]
Go to page Previous  1, 2


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
610nm Style by Daniel St. Jules of Gamexe.net