Game Development Community

Flying vehicle zero gravity and turning while stationary?

by JJ Du Plessis · in Torque Game Engine · 11/10/2008 (2:27 am) · 2 replies

I am new to the torque community and have been experimenting with scripts.

I have successfully created my own flying vehicle, but the controls don't 'react' the way they should.
I am trying to get my vehicle to still be able to turn while stationary, much like a spaceship would. I would also like the vehicle to not be affected by gravity, eg. it would not drift down to a preset hover height as it normally does.

I already searched the whole forum and couldn't find anything on this, thanx so much for any help you can offer!

#1
11/10/2008 (9:33 am)
The first thing I would do is implement 0 gravity into your game, then adjust your controls and vehicle datablock settings from there. Just do a search for "gravity" and you'll find a resource for it.

*edit: Well, since you're not an SDK owner, you can only do so much to modify your scripts, since you don't have access to the source code. Without the source, you can't add in indiviudalized gravity. So, your best bet is to play around with your script files (flyingVehicle.cs). AFAIK, you can't modify gravity without the source. But, you can modify the hover distance and controls through script.
#2
11/11/2008 (7:41 am)
Ok, I got it fixed using script. Maybe the wording of my question was wrong, it's not really zero gravity. I
basically just wanted my vehicle to stay at it's current height without drifting towards it's hover height, I fixed this by lowering the mass to 0.5, and now I am in the process of lowering the other settings so that it controls normally.

Another question: Is it possible to deactivate the hover function? I want to be able to fly upside down without being pushed down to earth. There must be some way to deactivate the hover jet.

Thanx for your advice Berry.