 		UpdateFluid(posRadD, velMasD, vel_XSPH_D, rhoPresMuD, derivVelRhoD, referenceArray, delT);
 		//UpdateBoundary(posRadD, velMasD, rhoPresMuD, derivVelRhoD, referenceArray, delT);
 		UpdateRigidBody(posRadD, velMasD,
-				posRadRigidD, velMassRigidD, AD1, AD2, AD3, omegaLRF_D,
+				posRadRigidD, velMassRigidD, qD1, AD1, AD2, AD3, omegaLRF_D,
 				derivVelRhoD, rigidIdentifierD, rigidSPH_MeshPos_LRF_D, referenceArray, jD1, jD2, jInvD1, jInvD2, paramsH, delT);
 		ApplyBoundary(posRadD, rhoPresMuD, mNSpheres, posRadRigidD, velMassRigidD, numRigidBodies);
 

					 thrust::device_vector<float4> & velMasD,
					 thrust::device_vector<float4> & posRadRigidD,
					 thrust::device_vector<float4> & velMassRigidD,
					 thrust::device_vector<float3> & AD1,
					 thrust::device_vector<float3> & AD2,
					 thrust::device_vector<float3> & AD3,

	CUT_CHECK_ERROR("Kernel execution failed: UpdateKernelRigid");


	UpdateRigidBodyQuaternion_kernel<<<nBlock_UpdateRigid, nThreads_rigidParticles>>>(F4CAST(qD), F3CAST(omegaLRF_D));
	cudaThreadSynchronize();
	CUT_CHECK_ERROR("Kernel execution failed: UpdateRotation");

	RotationMatirixFromQuaternion_kernel<<<nBlock_UpdateRigid, nThreads_rigidParticles>>>(F3CAST(AD1), F3CAST(AD2), F3CAST(AD3), F4CAST(qD));
	cudaThreadSynchronize();
	CUT_CHECK_ERROR("Kernel execution failed: UpdateRotation");

