Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

How to create a submersible plane.

Arrekusu Muromachi
SL Fighter Ace
Join date: 20 Feb 2005
Posts: 32
12-23-2005 05:18
Coming from an aircraft builder who understands the phyiscis of flight, I am now confused on how to make a submarine work. Particuarly a flying one.

I understand that the llSetVehicleFlags(VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT) is required to make a submarine however here's the problem I see.

The water level for each sim varies on a simwide scale. So one sim may have the base water level set at 20m while another has it set to 40m. This wouldn't work well if I had a fixed variable for the hover height. What would I need to do to allow for if the vehicle collides with the water, it changes modes?

I know the vehcile tutorial covers both on how to make a simple airplane or boat but it doesn't cover something as complex as a sub nor can I find any solid connection between both scripts without the flags and variables conflicting with each other.
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
12-23-2005 07:13
http://secondlife.com/badgeo/wakka.php?wakka=llWater will tell you the height of the water under you - it's the same throughout the sim, even if it varies between sims.
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
12-23-2005 07:53
Don't get caught thinking you need hoverheight for a sub, either. You can instead play with the way your script uses bouyancy depending on its relation to the surface of the sim water. Makes for a much more interesting sub/plane anyway.
_____________________