Moving physics from Tick to HandlePhysics
#3
That worked :D

It broke stuff a little, but it works :DD

So now if I want to negate friction when on a rail, I will just do this in cMinecart::HandlePhysics?
Code:
if ( (BlockBelow != E_BLOCK_RAIL) && (BlockBelow != E_BLOCK_DETECTOR_RAIL) && (BlockBelow != E_BLOCK_POWERED_RAIL) && (BlockBelow != E_BLOCK_ACTIVATOR_RAIL) ) { //Friction if (NextSpeed.SqrLength() > 0.0004f) { NextSpeed.x *= 0.7f/(1+a_Dt); if ( fabs(NextSpeed.x) < 0.05 ) NextSpeed.x = 0; NextSpeed.z *= 0.7f/(1+a_Dt); if ( fabs(NextSpeed.z) < 0.05 ) NextSpeed.z = 0; } }
Reply
Thanks given by:


Messages In This Thread
RE: Moving physics from Tick to HandlePhysics - by tigerw - 08-30-2013, 09:37 PM



Users browsing this thread: 1 Guest(s)