maneuveringForce and Flying Vehicles
by Mike "wowo" Miller · in Torque Game Engine · 01/11/2003 (3:52 pm) · 22 replies
Hi,
Has anyone else noticed that if you set the maneuveringForce variable in the FlyingVehicle datablock to a value larger than about 6000, the game will lock up after a few seconds of flying a vehicle?
Does anyone know why this is?? I'd like to make my aircraft a tad faster than they are... I'm currently using a value of 4000 for maneuveringForce.
I've also tried hard coding in a multiplier in FlyingVehicle.cc, so that the forward velocity of the vehicle is doubled.... this also causes the game to crash after a few seconds of flying.
Line 489 to be exact:
force += yv * (mThrust.y * mDataBlock->maneuveringForce * 2 * mCeilingFactor);
Can anyone help me with this?
Thanks,
Mike
Has anyone else noticed that if you set the maneuveringForce variable in the FlyingVehicle datablock to a value larger than about 6000, the game will lock up after a few seconds of flying a vehicle?
Does anyone know why this is?? I'd like to make my aircraft a tad faster than they are... I'm currently using a value of 4000 for maneuveringForce.
I've also tried hard coding in a multiplier in FlyingVehicle.cc, so that the forward velocity of the vehicle is doubled.... this also causes the game to crash after a few seconds of flying.
Line 489 to be exact:
force += yv * (mThrust.y * mDataBlock->maneuveringForce * 2 * mCeilingFactor);
Can anyone help me with this?
Thanks,
Mike
#2
01/22/2003 (7:13 pm)
Yes I confirmed this on serveral machines myself, all crashed with a value over 4000.
#3
01/22/2003 (8:51 pm)
Just had the same problem, it should be something less than 4000. The plane moves too fast for the engine to keep up and some error occurrs.
#4
That is to say, you guys will have a heck of a time fixing it if you don't know what in the engine is burning up.
01/23/2003 (11:46 am)
But what is the error?That is to say, you guys will have a heck of a time fixing it if you don't know what in the engine is burning up.
#5
Mike
01/23/2003 (11:50 am)
That is a good question. The program does not crash, it just seems to hang indefinitely. Like it's in an infinite loop or something. So we really don't have an error message to go on.Mike
#6
force -= xv * speed * mDot(xv,mRigid.state.linVelocity) * mDataBlock->horizontalSurfaceForce;
force -= zv * speed * mDot(zv,mRigid.state.linVelocity) * mDataBlock->verticalSurfaceForce;
with
force -= xv * mDot(xv,mRigid.state.linVelocity) * mDataBlock->horizontalSurfaceForce;
force -= zv * mDot(zv,mRigid.state.linVelocity) * mDataBlock->verticalSurfaceForce;
They're in the updateforces function. Hope that helps.
PS: I'm currently using a maneuveringforce of 24000 im my game.
01/24/2003 (9:31 am)
Try replacing force -= xv * speed * mDot(xv,mRigid.state.linVelocity) * mDataBlock->horizontalSurfaceForce;
force -= zv * speed * mDot(zv,mRigid.state.linVelocity) * mDataBlock->verticalSurfaceForce;
with
force -= xv * mDot(xv,mRigid.state.linVelocity) * mDataBlock->horizontalSurfaceForce;
force -= zv * mDot(zv,mRigid.state.linVelocity) * mDataBlock->verticalSurfaceForce;
They're in the updateforces function. Hope that helps.
PS: I'm currently using a maneuveringforce of 24000 im my game.
#7
Fun :) Thanks!
01/24/2003 (11:49 am)
REally, that's what it will take to make this quirk go away?Fun :) Thanks!
#8
01/25/2003 (8:29 am)
Good that this has been fixed! (Hopefully... :)
#9
01/29/2003 (5:30 am)
You're welcome. =)
#10
Thanks,
Robert
02/02/2003 (10:55 am)
This fix will not prevent the engine from crashing if something moves too fast. It doesn't prevent the flying vehicle from obtaining the speed needed to crash the engine. In short, I tried it and it doesn't work. Any chance I can see your datablock for the vehicle with the manuevering force of 24000? It's really the jetspeed i am most concerned with. I want quick turbo, and slow impulse.Thanks,
Robert
#11
If you have the latest vehicles changes by Tim Gift(HEAD), just add this
integration = 4; // Physics integration: TickSec/Rate
collisionTol = 0.1; // Collision distance tolerance
contactTol = 0.1; // Contact velocity tolerance
to your flying vehicles .cs in the datablock. Not sure if all 3 are needed.
BTW : Thanks Sebastiao !
02/13/2003 (10:43 am)
Robert,If you have the latest vehicles changes by Tim Gift(HEAD), just add this
integration = 4; // Physics integration: TickSec/Rate
collisionTol = 0.1; // Collision distance tolerance
contactTol = 0.1; // Contact velocity tolerance
to your flying vehicles .cs in the datablock. Not sure if all 3 are needed.
BTW : Thanks Sebastiao !
#12
I would like to know if everybody got it to work right.
Indeed, I made other changes to the flying code so maybe this hack will not work for everyone. If so, drop me a note and I will investigate it further.
03/12/2003 (4:29 am)
Hi again, I would like to know if everybody got it to work right.
Indeed, I made other changes to the flying code so maybe this hack will not work for everyone. If so, drop me a note and I will investigate it further.
#13
Cheers,
Robert
03/14/2003 (6:18 pm)
SEBASTIO: As far as I can tell, your change doesn't work on it's own.Cheers,
Robert
#14
I'm short of time right now, but later I'll see if I can find the relevant changes in my code. See ya
03/17/2003 (6:59 am)
Ok,I'm short of time right now, but later I'll see if I can find the relevant changes in my code. See ya
#15
// Copy the found zones into the buffer...
AssertFatal(numMasterZones != 0, "Error, no zones found? Should always find root at least.");
This would happen if numZones was equal to zero.
The value is set in the following line ->
bool outsideIncluded = mZoneManagers[i].obj->getOverlappingZones(obj, zoneBuffer, &numZones);
But I don't think this returns zero in numZones because I don't get the following assertion
AssertFatal(numZones != 0 || outsideIncluded == true, "Hm, no zones, but not in the outside zone? Impossible!");
it is subsequently set here ->
numZones = getMin(numZones, SceneObject::MaxObjectZones - numMasterZones);
SceneObject::MaxObjectZones is 128.
enum {
MaxObjectZones = 128
};
this last assignment returns zero of course and the program asserts.
From here it becomes rather complicated because it involves so much in scenegraph. Can someone from GarageGames please look into this? Thank you!
Robert
03/18/2003 (9:41 pm)
OK, I implimented Tim's changes. The game still crashes when the vehicle reaches high speeds. This is a real problem. Ben... to answer your question, it's scenegraph.cc line 920 which is ->// Copy the found zones into the buffer...
AssertFatal(numMasterZones != 0, "Error, no zones found? Should always find root at least.");
This would happen if numZones was equal to zero.
The value is set in the following line ->
bool outsideIncluded = mZoneManagers[i].obj->getOverlappingZones(obj, zoneBuffer, &numZones);
But I don't think this returns zero in numZones because I don't get the following assertion
AssertFatal(numZones != 0 || outsideIncluded == true, "Hm, no zones, but not in the outside zone? Impossible!");
it is subsequently set here ->
numZones = getMin(numZones, SceneObject::MaxObjectZones - numMasterZones);
SceneObject::MaxObjectZones is 128.
enum {
MaxObjectZones = 128
};
this last assignment returns zero of course and the program asserts.
From here it becomes rather complicated because it involves so much in scenegraph. Can someone from GarageGames please look into this? Thank you!
Robert
#16
Error, no zones found? Should always find root at least.
06/29/2004 (3:05 pm)
If this helps at all, I had the same error in my submarine game, and it was "fixed" when I turned the mass of my vehicle from 0 to 5. I dunno if that helps but it was the EXACT same errorError, no zones found? Should always find root at least.
#17
12/21/2005 (3:53 pm)
I think integration needs to be proportional to manueveringForce. What the proportion would be, I don't know.
#18
1.Half a second before the game hangs, the warsparrow wobbles violently, like it's just lost control. It happens so fast that I didn't notice it at first, but now that i know it's there, I have noticed that it happens every time right before the game hangs.
2. If I increase the mass of the warsparrow from 500 to 1000, I can enter a ManeuveringForce of 10000 without the wobble/hang. It takes me longer to reach max speed but I can travel in a straight line without incident. If I dive and pick up more speed I get the wobble/hang thing again. With a ManeuveringForce of 15000 and and a mass of 2000, I can't seem to get it to do the wobble/hang thing no matter how hard I try. The speed is kind of fun even though the warsparrow now handles like a flying cow. Mooooooooo.
Like I said, I have no idea what the numbers are doing under the hood, but I though the observation would be of some use to someone.
01/26/2006 (7:36 pm)
I'm running v1.4 with the warsparrow pack and I've had the same problem. I'm no programmer, so I can't even guess at what is going on, but I've made the following observations that may help:1.Half a second before the game hangs, the warsparrow wobbles violently, like it's just lost control. It happens so fast that I didn't notice it at first, but now that i know it's there, I have noticed that it happens every time right before the game hangs.
2. If I increase the mass of the warsparrow from 500 to 1000, I can enter a ManeuveringForce of 10000 without the wobble/hang. It takes me longer to reach max speed but I can travel in a straight line without incident. If I dive and pick up more speed I get the wobble/hang thing again. With a ManeuveringForce of 15000 and and a mass of 2000, I can't seem to get it to do the wobble/hang thing no matter how hard I try. The speed is kind of fun even though the warsparrow now handles like a flying cow. Mooooooooo.
Like I said, I have no idea what the numbers are doing under the hood, but I though the observation would be of some use to someone.
#19
01/27/2006 (8:06 am)
Thanks Sage, i just ran into this as well and was wondering about it. Great note about the wobble, I saw that too.
#20
05/11/2006 (1:51 pm)
Ok just wondering, is this post still an issue or have GG cleared it up? is there a fix?
Associate Kyle Carter
Once you know why it's doing, you'll have a clue as to what to change to fix it... hopefully :)