![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
04-06-14, 11:36 AM
|
#3121 | ||
|
Navy Seal
![]() Join Date: Jan 2011
Location: CJ8937
Posts: 8,160
Downloads: 793
Uploads: 10
|
Quote:
Quote:
|
||
|
|
04-06-14, 02:14 PM
|
#3122 |
|
Black Magic
![]() |
having some trouble with the flags following wind direction patch. The law of cosines doesn't appear to be working correctly. I change wind direction to all different angles and it's not working. If unit's heading is 270 degrees @ 5knots and wind's direction is 45 degrees (blowing from 45 to 225 degrees) with a speed of 5 knots it works fine. Change wind direction to 90,135,180,225,270, and 315 and it's broken. Think I need to walk away from this a bit as my brain hurts
|
|
|
04-06-14, 03:03 PM
|
#3123 |
|
Black Magic
![]() |
Looks like I figured it out. Needed to account for which quadrant the wind was in (took COS of wind direction). Depending on whether the result of COS(wind direction) was positive or negative decided whether to add or subtract yaw amount based on wind from the flag's current yaw amount.
|
|
|
04-06-14, 03:16 PM
|
#3124 |
|
Ace of the deep .
|
How do you work out the direction of the flag in relation to the speed of the vessel ?
|
|
|
04-06-14, 03:58 PM
|
#3125 | |
|
Black Magic
![]() |
Quote:
![]() For your question see here: http://www.subsim.com/radioroom/show...postcount=3117 I'm missing something big time and I just can't figure out what it is ![]() Basically what I'm trying to solve is: flag has yaw value that puts it in line with course of ship (it's always parallel with length of unit) I'm trying to get wind speed/direction to alter this yaw value |
|
|
|
04-06-14, 04:27 PM
|
#3126 |
|
Samurai Navy
![]() |
Would this also work for flags attached to the submarine by mods? What exactly is the problem?
|
|
|
04-08-14, 06:01 PM
|
#3127 | |
|
Black Magic
![]() |
Quote:
![]() Finishing up the patch currently. What a freakin pain in the you-know-what this patch was. There were so many things that I had to discover/figure out first and through trial and error. Those discoveries though are needed for some future patches - I had to do it now or later. These new discoveries will help me in trying to develop a signal light for the player's unit. My idea is to attach a searchlight to the player's unit but have it hidden so it's not rendered. Then when you ask to use the signal light (via a new game command) it shows and you can rotate it and turn it on/off. So it would actually be able to be used as signal light to signal to other players (communicate to other players via light messages) or as a search light at night time How this new flags affected by wind patch works: - I use a vector to model ship's heading and speed - I use a vector to model wind's direction and speed Then using vector math I add the two vectors together. Convert the resultant vector into polar coordinates. This gives me a magnitude and an angle. The angle is the angle the flag will reside at on the unit. The magnitude is not being used but could be later (scaling of flag - i.e. if magnitude is very small then render flag small thus simulating flag not extended due to wind) By doing the above the physics of the flag is modeled. This means unit's speed and heading and wind's speed and heading determine the resultant angle of the flag. Let's say unit is heading 270 @ 5 knots. Wind direction is 45 degrees @ 5 knots. The flag will be facing ~112 degrees: No wind: <-------unit @ 5 knots ------ flag @ 5 knots-------> With wind at 45 degrees @ 5 knots: <-------unit @ 5 knots \ --------------------------------\ ---------------------------------------\ flag As in real life the game also uses how wind is defined. If you say wind is 45 degrees @ 5 knots that means it's blowing from 45 degrees to 225 degrees (SW) at 5 knots. In the example above if the unit slows down then the flag's angle will increase (>112 degrees) or become more out of line with unit. If the unit speeds up the flag's angle will decrease (<112 degrees) or become more in line with the unit. Because of how this patch works none of the flags defined in the stock flags.dat have GlobalWind controllers attached to them. Those will need to be added in order to see this patch work
|
|
|
|
04-08-14, 09:16 PM
|
#3128 |
|
Black Magic
![]() |
Time to add a completely new idea/feature to the Silent Hunter franchise that's never been available before in any of it's titles
![]() v1.0.162.0 released. See post #1 Starting with v1.0.162.0 added a new game file to the patcher: kernel.dll. Add a new patch to kernel: Objects follow wind direction. This new patch will have any objects that have _FLG in their name (flags for one) AND a GlobalWind controller attached to them take wind direction and speed into consideration. See the Files= and Notes= of the patch for more info. |
|
|
04-09-14, 12:42 AM
|
#3129 | |
|
Count Dracula
|
Quote:
awesome work tdw thx
__________________
|
|
|
|
04-09-14, 03:25 AM
|
#3130 |
|
Sparky
![]() Join Date: Aug 2005
Posts: 151
Downloads: 500
Uploads: 0
|
WOW!......Just WOW!!
![]() ![]() |
|
|
04-09-14, 07:07 AM
|
#3131 |
|
Navy Seal
![]() Join Date: Jan 2011
Location: CJ8937
Posts: 8,160
Downloads: 793
Uploads: 10
|
hats off
|
|
|
04-09-14, 08:50 AM
|
#3132 |
|
Black Magic
![]() |
Any chance you can whip up some new icons for a signal lamp? I need icons for enable/disable signal lamp (this would make the 3D signal lamp visible/not visible on the player's unit), turn signal lamp on/off, and transmit message. That's all I can think of currently. If you or anyone else thinks I need some more then post up your ideas
|
|
|
04-09-14, 08:56 AM
|
#3133 |
|
Count Dracula
|
@TDW
any news about the manual flooding balast tanks ? will be awesome to have also manual flooding blasat tank.
__________________
|
|
|
04-09-14, 09:00 AM
|
#3134 | |
|
Black Magic
![]() |
Quote:
|
|
|
|
04-09-14, 09:11 AM
|
#3135 | ||
|
Navy Seal
![]() Join Date: Jan 2011
Location: CJ8937
Posts: 8,160
Downloads: 793
Uploads: 10
|
Quote:
Quote:
|
||
|
|
![]() |
|
|
