Game Development Community

Flying vehicle wont stay underwater!

by Frederic "Intruder" Tessier · in Torque Game Engine · 03/08/2003 (7:29 pm) · 3 replies

Hello folks!

Well i am trying to get my flying vehicle to remain underwater but i cant, each time it will always go up to the surface. I know they arr some setting for hover which i try to change like this :

hoverHeight = -360; // Height off the ground at rest
createHoverHeight = -360; // Height off the ground when created

But it didnt seem to have any effect, i guess i will need to change the code for the flying vehilde to force it to not hover the water. Unless people have a better idea/solution on how to fix this problem?

Thanks for your collaboration in advance.

#1
03/08/2003 (9:16 pm)
Set the density to a higher setting in the flyers datablock.

density = 1.0; // anything higher than the water its in will sink it. Usually water has a 0.9 density.
#2
03/09/2003 (6:56 am)
Thanks for the tips!

So now i have set the density to 2.0 for my vehicle, so when i oriented it toward the bottom it has sink, but when i left the vehicle straight (at 0 degree), then it started to go up to the surface but now at much more slower rate. Maybe i should increase the density of the vehicle?

Will continue to do some test now.
#3
06/29/2004 (3:06 pm)
I dunno if it helps but I also noticed that flying vehicles behave extremely strange around water's surface (and no idea why)