mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-12 19:31:41 +00:00
code review:
1) got rid of evey class having it's own gravity 2) rigidshape inheritance simplifications 3) gravitymod from physicszones taking buoyancy into account natively (we still track raw bouyancy to cancel it out for player) 4) disableMove used throughout 5) items can now also be influenced by the appliedforce from physicszones
This commit is contained in:
parent
76c5e30869
commit
afb39d398f
13 changed files with 191 additions and 487 deletions
|
|
@ -1000,7 +1000,7 @@ ShapeBase::ShapeBase()
|
|||
mLiquidHeight( 0.0f ),
|
||||
mWaterCoverage( 0.0f ),
|
||||
mAppliedForce( Point3F::Zero ),
|
||||
mGravityMod( 1.0f ),
|
||||
mNetGravity( 1.0f ),
|
||||
mDamageFlash( 0.0f ),
|
||||
mWhiteOut( 0.0f ),
|
||||
mFlipFadeVal( false ),
|
||||
|
|
@ -1768,7 +1768,7 @@ void ShapeBase::updateContainer()
|
|||
// Set default values.
|
||||
mDrag = mDataBlock->drag;
|
||||
mBuoyancy = 0.0f;
|
||||
mGravityMod = 1.0;
|
||||
mNetGravity = gGravity;
|
||||
mAppliedForce.set(0,0,0);
|
||||
|
||||
ContainerQueryInfo info;
|
||||
|
|
@ -1797,7 +1797,7 @@ void ShapeBase::updateContainer()
|
|||
}
|
||||
|
||||
mAppliedForce = info.appliedForce;
|
||||
mGravityMod = info.gravityScale;
|
||||
mNetGravity = (1.0-mBuoyancy)*info.gravityScale* gGravity;
|
||||
|
||||
//Con::printf( "WaterCoverage: %f", mWaterCoverage );
|
||||
//Con::printf( "Drag: %f", mDrag );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue