Jump to content
Sign in to follow this  
dmarkwick

setVectorDir & setVectorUp questions

Recommended Posts

There's very little info on setVectorDir & setVectorUp, the reference pages just barely describe it, mentioning the array consists of "numbers". X,Z,Y. I understand the difference between XZY and XYZ systems, but how that corresponds to setVector I have no idea. Are they angles? Co-ords? Relative? Absolute?

I tried playing around with them but quite frankly I am utterly lost trying to fathom out their usage from random testing of values. Quite obviously I am washed downstream in a torrent of math, vectors, trigonometry & God only knows what else. I sometimes see patterns of behavior with some values but it then cruelly transpires not to be dry land but instead a few soggy straws of misunderstanding.

Exhausted I drag myself, soggy with hopeless confusion, to the shores of hopeful forum activity smile_o.gif

Context

I want an object (a viewblock object if it makes any difference), to point in the direction of the wind, and to have a lean proportional to the strength of the wind. The lean should be 0 degrees for no wind, up to 90 degrees (preferably slightly less) for maximum wind. (Let's imagine maximum wind = 10)

Now, I can do stuff like get wind direction, no problem. Also I can get wind velocity, also no problem.

The problem is that I have no idea how to apply these values, or even if these values have any meaning when applied to setVectorDir/Up.

Can anybody shed any light at all on the usage of these commands? I saw the !Play demo mission mentioned in another thread, but quite frankly the code in that looks way, way more complex than I

1. need

2. can understand.

Anyone help out please?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×