//-----------------------------------------------------------------------------
	void PhysicsVehicle::updateTick( const float accumTime, const float deltaTime )
	{
		if(isRemoteObject() == true)	{
			bool test(true);
 			test = false;
		}
 		if(_updateVelocities == true)	{
			float ctrlMove(0.0f);
			float ctrlRotate(0.0f);
			const AbstractController* controller(getController());
			if(controller != nullptr)	{
				ctrlMove = controller->getActionValue(EControllerAction_Move);
				ctrlRotate = controller->getActionValue(EControllerAction_Yaw);

				if(ctrlMove != 0.0f || ctrlRotate != 0.0f)	{
					// you might set a breakpoint here ...
					bool test(true);
					test = false;
				}
			}
			updateAngularVelocityYaw(ctrlRotate, deltaTime);
			updateLinearVelocity(ctrlMove, deltaTime);
		}

		// integrate with given linear and angular velocity
		_internalMotionState.integrateMotionState(deltaTime);
	}
Example #2
0
void BilliardBall::updateBilliardBall(float dt) {
	//log("%f %f %f %f", angularVelocity.x, angularVelocity.y, angularVelocity.z, pBody->GetAngularVelocity());
	//log("%f %f", linearA.x, linearA.y);
	updateSprite();
	updateLinearVelocity(dt);	//선운동
	updateAngualrVelocity(dt);	//각운동
}