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
#22
Here is the fix that finally worked for me.
Code: Flying Vehicle Fix
-edit- Oh, and I believe it's still an issue. It's a good thing that the above fix is so simple.
05/12/2006 (5:40 pm)
@Aaron-Here is the fix that finally worked for me.
Code: Flying Vehicle Fix
-edit- Oh, and I believe it's still an issue. It's a good thing that the above fix is so simple.
Torque Owner William Todd Scott
I ran into this problem recently.
I traced it to the physics simulation becoming wildly unstable, resulting in an F32 overflow, that would then crash the engine in one of several different places.
The solution will depend upon the vehicle that you are using (because each has different physics), but basically I started clamping velocities and forces and the vehicle I am working on stopped crashing/freezing the engine.
Todd