//----------------------------------------------------------------------------- // // VActorPhysicsController::preTickUpdate( pDelta ); // // ... // //----------------------------------------------------------------------------- void VActorPhysicsController::preTickUpdate( const F32 &pDelta ) { // Pop Delta. mInterpController.popDelta(); switch( mControlState ) { case k_PathControlState : { AssertFatal( isPathing(), "VActorPhysicsController::preTickUpdate() - Invalid Path State." ); // Fetch Mount Velocity. const VectorF &mountVelocity = mMountedPath->getMountVelocity( mObject->getMountNode() ); // Use X & Y Velocity. VectorF velocity = getVelocity(); velocity.x = mountVelocity.x; velocity.y = mountVelocity.y; // Apply Updates. setVelocity( velocity ); } break; } // Update Move State. updateMoveState(); }
bool SimMovingShape::onSimTimerEvent(const SimTimerEvent* event) { if (event->timerId == SimTimerSetId) { updateMoveState(event->timerInterval); return true; } // We happen to know the base class process timer events: return true; }