|
Gabriel Fisher
Registered User
Join date: 1 Mar 2006
Posts: 2
|
06-20-2007 10:57
I am trying to make an amphibious car but i'm having trouble getting it to float above water.
I have looked at the other threads regarding amphibious vehicles but they are either seaplanes or some kind of submarine. From looking at those threads it looks like they change the type of vehicle they are when they enter the water or they have it detect how far they are from water and never go below it.
Is it possible to change my vehicle type from car to boat when it reaches water or have it never go below the water line?
|
|
AnnMarie Otoole
Addicted scripter
Join date: 6 Jan 2007
Posts: 162
|
06-20-2007 14:56
I'm guessing you should be able to do an llGetPos() to find the location. The Z vector will give you the altitude. You can test this and alter the vehicle altitude to make sure it doesn't go negative.
|
|
Gabriel Fisher
Registered User
Join date: 1 Mar 2006
Posts: 2
|
06-20-2007 16:35
That makes sense, but im not sure how to make it not go underwater. Do I change the buoyancy? im not sure how to push it upwards like that
|
|
DoteDote Edison
Thinks Too Much
Join date: 6 Jun 2004
Posts: 790
|
06-20-2007 16:49
Easy solution, find a boat script that works the way you want. Then, morph your two scripts into one script with multiple states. When you need to drive on land, switch to the car state, and when you need to drive on water, switch to the boat state.
|