How to fix flying vehicles going thorugh stuff
by Dan Keller · in Torque Game Engine · 01/03/2006 (11:12 am) · 7 replies
If anyone has the problem of a flying vehicle that goes through terrain and interiors at high speeds, you can fix it by changing collisionTol to 0.5 in the datablock. (You may have to change it to something slightly higher if you have a high maneuveringForce.)
About the author
Recent Threads
#2
Just to add an offbeat idea . . . I'm currently using a weapon object that fires rapidly with very short lifetime projectiles. The projectiles apply a radius impulse to bounce the flyer away from the terrain/interior/shape. It works pretty well, but not perfectly. I'm hoping that additional tweaking will solve this for me.
Anyway, just an idea.
Aaron E.
01/03/2006 (12:15 pm)
Hi guys,Just to add an offbeat idea . . . I'm currently using a weapon object that fires rapidly with very short lifetime projectiles. The projectiles apply a radius impulse to bounce the flyer away from the terrain/interior/shape. It works pretty well, but not perfectly. I'm hoping that additional tweaking will solve this for me.
Anyway, just an idea.
Aaron E.
#3
Only problem I can see would be he use of this solution in multiplayer.
All of those projectiles flying back and forth across through the network layer could have an adverse imapct on performance, which for me is not an option. =\
01/03/2006 (12:43 pm)
Interesting idea Aaron.Only problem I can see would be he use of this solution in multiplayer.
All of those projectiles flying back and forth across through the network layer could have an adverse imapct on performance, which for me is not an option. =\
#4
I haven't tried it out on a network yet. You're probably right, though. If it ends up not working for me, I'll try something else . . .
My other oddball idea is to look at the terrain and water rendering code and see how the engine determines if part of a water block is above or below the landscape. Currently, water that is immediately under terrain doesn't get rendered. Whatever the code is that determines the undergrounded-ness of water might also help us keep our flyers above ground. Once that determination is made, we could trigger a localized impulse or maybe 'set' the translation of the flyer/player back up above the terrain.
I think Josh Ritter fiddled with underground detection for MoM to allow him to have streams/lakes/etc in his dungeons/caves. If he did get it working properly, then that approach should be network-safe for the rest of us. :)
Aaron E.
[edit: added a smilie.]
01/03/2006 (1:01 pm)
Kirby,I haven't tried it out on a network yet. You're probably right, though. If it ends up not working for me, I'll try something else . . .
My other oddball idea is to look at the terrain and water rendering code and see how the engine determines if part of a water block is above or below the landscape. Currently, water that is immediately under terrain doesn't get rendered. Whatever the code is that determines the undergrounded-ness of water might also help us keep our flyers above ground. Once that determination is made, we could trigger a localized impulse or maybe 'set' the translation of the flyer/player back up above the terrain.
I think Josh Ritter fiddled with underground detection for MoM to allow him to have streams/lakes/etc in his dungeons/caves. If he did get it working properly, then that approach should be network-safe for the rest of us. :)
Aaron E.
[edit: added a smilie.]
#7
Anyway, if it still pops through, I can just set collisionTol higher. (It doesn't have much affect on how it looks)
01/04/2006 (4:17 pm)
I didn't mean this as a foolproof fix, it's just sort of a hack to get it to work in the short run before someone actually fixes the problem.Anyway, if it still pops through, I can just set collisionTol higher. (It doesn't have much affect on how it looks)
Torque Owner Kirby Webber
Not to "steal your thunder" or anything like that, but the collision issues affecting flyers and hovers (closely related classes anyway) go much deeper than collisionTol.
Have you set up jetting for your flyers yet?
If not, do so... get some altitude, aim at the ground, hit the afterburner and slam the terrain.
I bet you still pop through.
If I'm worng, by all means, correct me. This has been my biggest issue (working with hovers).