Game Development Community

Hover limits?

by Max Thomas · in Torque Game Engine · 03/25/2005 (8:19 pm) · 7 replies

Hey guys,

Been a little while, and sorry for the overly vauge thread topic.... Well, here is the question, simple enough I hope.... I am probably missing it, but is there a way to give flying or hover vehicles a limit as to how close to the terrain they can get?.... Example, if you flew your vehicle up and then almost strait down at the terrain and kept dragging the vehicle across the terrain it will after but a few secconds push it's way through the terrain... Is there any way I can prevent that?... Like, I need a maxhoverhight and a minhoverhight to just keep my vehicle in it's respective hight area withought escaping.....


Any help would be greatly appreciated, Thanx, Max

#1
03/28/2005 (12:04 pm)
For hover vehicles, you'll want to play with stabLenMin and stabLenMax. Hover vehicles basically ride on a spring; during normal movement the vehicle is kept within these distances from the ground.

Two other variables also affect this:
stabSpringConstant: Higher values provide for less bobbles from bumps and direction changes...

stabDampingConstant: Smooths out residual vertical motion from landings and bumps. Higher values provide greater smoothing.

Somewhere out there (don't remember exactly where), there's a resource/forum post with a lot more info, so try a search. (And, not to be condescending or anything, this really seems like a topic for the Getting Started forum...)
#2
03/28/2005 (6:09 pm)
Hey,


Thanks for that info, yes, you are probably right, this would have been more aproperate in the Getting Started forum. Yeah, I did a search through the forums and resources, but didn't really find anything of great value... The main problem for this was really with flying vehicles actually, now, thanx to your help I have my hover vehicles in working order, but is there a simple script change that I could use to do the same with flying vehicles? I'm assuming that those vars aren't going to work in a FlyingVehicleData block, I'm sure I could probably work something out in C++, I just really wanted to know if there was a simple way to go about this...

Thank you, Max
#3
03/28/2005 (6:48 pm)
Flyers just have hoverHeight which sets the height off the ground when the vehicle is allowed to stop.

Here's one link with more info:
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=2490

Also, the official reference is handy:
www.garagegames.com/docs/torque/general/ape.php

Good luck!
#4
03/28/2005 (7:22 pm)
Hey again, yeah, I've seen the both of those, my problem is that the vehicle doesn't have the hover hight limit when it's moveing, and thats why it keeps managing to push it's way onder the terrain...

Thank you so much for all of your time, greatly appreciated, Max
#5
03/28/2005 (7:49 pm)
Here's the thread with more detailed explinations of the hover class variables:

www.garagegames.com/mg/forums/result.thread.php?qt=20742

As for the hover getting under the terrain, that's the result of collision problems. Check out this thread:

www.garagegames.com/mg/forums/result.thread.php?qt=17384

Down near the bottom are a couple of posts from Akio which detail some code changes that have (to date) eliminated collision problems we had been having.
#6
03/28/2005 (8:48 pm)
Wow! Thank you very much so, I can't believe I overlooked that... Going off to see what I get do with this!


Thanks again, Max
#7
03/30/2005 (1:24 pm)
I completely forgot about those threads! =P

I think maybe it's time for a good reference/tutorial to bring all the Hover vehicle info from the various threads together... Any volunteers? =)