Game Development Community

Once again.. Hovering

by Instinctz · in Torque Game Engine · 03/22/2008 (1:58 am) · 7 replies

Hey folks hows is it goin?

Overview, been diving into the torque engine and everything, love most of it so far hehe. I know alot of questions pop up on the hover class.. which is what this one is moving towards.

I've been able to get ground and air vehicles in fine, but a very important part of this game revolves around accurately controlled hover vehicles. That is, nearly as "controllable" as the original character itself.

From what I have read it takes alot of messing around with the variables in the vehicle and hover classes to become what ever it is your looking for, but I was hoping you guys could point me in the right direction as to my problems.

For example, I keep falling through the terrain quite alot.. some things seem to help but I cant really narrow down as to -why- I am falling through. Part of it seems that my character is "tipping" over.

Second issue is bouncing. As soon as I think im close and Im not falling through the terrain I begin to bounce uncontrollably. Cant seem to narrow down what is controlling exactly what.


Again.. really any advice on what I could try would be GREATLY welcomed! My vehicle is a basic square object which you stand on.

#1
03/22/2008 (2:43 am)
Tipping over can be from the center of gravity, which is the center of the bounding box of your dts object. try using the torque buggy for your hover and the datablock found in the tdn (search hover datablock) and see what you get. the solution to the hover is to get a stable base to work from.

i hope that helps

Neil.
#2
03/23/2008 (2:13 am)
I tried using the buggy, using the base datablock form the tdn (commented out sounds and particals).

It did seem more stable.. but still nothing like I thought it should be. As long as you stay slow its 'ok' but if you go much more than walking speed you'll bounce around on any slight gradient and possibly fly plum threw.

I was just goin to double check before I took the extra time to write an entire new system for hover vehicles.. thought maybe I was doing something wrong. But turns out the entire class is pretty useless (from what I can see).

Just adds that much more time to development I guess.

But if anyone else has any other idea's I should try I'd love to hear them.. or even an example of some that work would be great.
#3
03/23/2008 (3:20 am)
Well you have to play with the datablock settings and learn what everything does to get it how you want, its all in the physics; the hover is hard to get stable but it is possible.
#4
03/23/2008 (8:52 am)
Hovering physics are really starting to get me impatient.

I even implemented a resource to stop the engine from crashing when the vehicle got going to fast, so I could turn integration to 1, as it should be.

Even doing this, the hover vehicle can still fall through the ground.

When it so much as even TOUCHES the ground at slow speeds, it starts to tip to the side you touched the ground on. So if I touched the left side, it would seem to slide onto it's back to the left.

When I touch the ground at high speeds, it either does what it's supposed to and explodes, or gets stuck in the ground.

This is really making me want to just create a wheeled vehicle with really low and spread apart wheels and make them invisible.
#5
03/23/2008 (6:52 pm)
Yeah making them wheeled is a possible thing to do, but they then have trouble acting anything like a hover vehicle should.

Hovering is broke, just doesn't work correctly. Even after tweaking things for 3 days you just end up with a hampered vehicle which most likely is no were near what you wanted it to be like. Instead of being able to have that fast paced vehicle you had to chop its speed in half and raise it twice as high off the ground just to account for terrain collisions.

Multiple bounding boxes later, that route never fixed any issues, triangle, square, largely over sized square, nothing really fixes the problems that are just inherited from the code, only "band aids" the issue.

How ever, please someone correct me if I'm wrong..
#6
04/19/2008 (3:26 am)
I haven't done this yet, but I can think of a couple basic fixes for the hovercraft behavior I've seen.

1) It should be easy enough to put in a failsafe that keeps it above a certain height over the ground at all times. It won't be possible to crash into a mountain side that way or anything like that, but it should fix the weird collisions and falling below the terrain.

2) A more refined technique would be to make it fire some rays in front of the vehicle to see if going to run into a hill, and if so, to drop its forward thrust and apply more lift instead. That would make its maneuvers look a lot more natural than the previous method. The pitch of the vehicle should also be adjusted to match the terrain just ahead of it instead of directly below it.

I think we have hovercraft in Ascension that might still need some such improvements. I'll let you know how it works out for me.
#7
04/20/2008 (12:21 am)
Would it be possible to make modifications to FlyingVehicle to get more hover-y behaviour? Basically, adding gravity, and upthrust when too close to the terrain? I haven't played around with vehicles much, so I don't know how FlyingVehicle feels to control.