Jump to content

Seaplane script, above water surfaces


Sunbleached
 Share

You are about to reply to a thread that has been inactive for 1692 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hello! I continue to struggle with my seaplane script. and I got a little problem. the fact is that in the script there are several states - above water, on water, above the ground and on the ground. the problem is that when driving (taxiing) on "above water surfaces", the script thinks that I am in the air above the water. Such surfaces are common at many airports. it's a little uncomfortable. is there a way how to make the script think or act like I'm on LL default land at such a moment?

I set a separate buoyancy for each throttle. I have not found any other solution at the moment except to set buoyancy to 0 up to 4th throttle.

Edited by Sunbleached
Link to comment
Share on other sites

There are some ll functions to return the height above ground or above water (llGround() and llWater() ), in the wiki, as I recall. One way therefore would be to ask for both heights, and use the two of them to determine if the plane is actually in contact with the water or the ground and behave accordingly. Worth looking at them and adding them to your script to chat out the values they are getting, I would expect when you are on the water the height above water would be less than the height above ground (which is actually under the water at that point), and on a runway height above ground would be less than the height above water.

  • Thanks 1
Link to comment
Share on other sites

2 hours ago, Profaitchikenz Haiku said:

There are some ll functions to return the height above ground or above water (llGround() and llWater() ), in the wiki, as I recall. One way therefore would be to ask for both heights, and use the two of them to determine if the plane is actually in contact with the water or the ground and behave accordingly. Worth looking at them and adding them to your script to chat out the values they are getting, I would expect when you are on the water the height above water would be less than the height above ground (which is actually under the water at that point), and on a runway height above ground would be less than the height above water.

Thank you very much for your answer! i draw this little scheme to show what i mean

Untitled-1.png

Link to comment
Share on other sites

So you want to taxi along the ground where it is level, follow the sloping ground down to the water, then taxi on the surface of the water?

 

It seems simple enough, if you have a variable which can indicate if the seaplane is parked, taxiing, flying or a heap of mangled wreckage, then when the mode is taxiing, the Z value of the seaplane is to be H + offset

H is found by taking llGround and llWater and taking the Max of them, and whilst at it, set a variable to record if you are on land or water, because you will need it for the next step.

offset will be one of two values: if on ground, it is the distance between the linkset root prim centre and the lowest edge of the wheel, if on water, the distance between the linkset root prim centre and the waterline of the loaded seaplane.

 

However, you are also going to have to do some more work if you want it top taxi up and down steeply sloping ground, because you will need to rotate to match the slope. Probably best to get the other stuff working first.

  • Thanks 1
Link to comment
Share on other sites

It's worth having the model understand being in ground effect, too. Seaplanes start as draggy boats, then get enough speed to go into ground effect floating just above the water, then gain flying speed, then really take off. Landing is getting into ground effect and letting speed bleed off until you land.

Ground effect extends up to about the wingspan of the aircraft.

  • Thanks 1
Link to comment
Share on other sites

20 hours ago, animats said:

Ground effect extends up to about the wingspan of the aircraft.

There is a Russian plane?? that uses ground-effect exclusively on water, it never flies above a few metres, I can't recall the name of it now but it was something like dragon.

 

A seaplane in SL could end up getting very complicated if you tried to replicate all the physics, I have a feeling that the simplest solution is to treat it as a fast-moving balloon.

  • Thanks 1
Link to comment
Share on other sites

6 minutes ago, Profaitchikenz Haiku said:

There is a Russian plane?? that uses ground-effect exclusively on water, it never flies above a few metres, I can't recall the name of it now but it was something like dragon.

 

Ekranoplan.

Flies about 6 meters above the water. Doesn't have enough wing or power to get out of ground effect. Much faster than a ship.

  • Thanks 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1692 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...