Home > other >  Touch screen rotation of rigid body model, caton when fingers off
Touch screen rotation of rigid body model, caton when fingers off

Time:09-17

Want to write a touch screen rotation control inertia: the if (Input. TouchCount & lt;=0)
{
return;
}
If (1==Input. TouchCount)
{
Touch Touch=Input. GetTouch (0);
DeltaPos=touch. DeltaPosition;
Print (deltaPos);
Vector3 Torque=new Vector3 (deltaPos. J y, - deltaPos. X, 0).
The transform. GetComponent (). AddTorque (Torque);
}

Now the problem is that when the finger off, there will be a flash card, how do I solve?
  • Related