示例#1
0
    public override void DealOnFingerHover(FingerHoverEvent e)
    {
        if (followWind != null && (Time.time - e.Finger.StarTime) > 0.12f)
        {
            Vector3 touchPosition = Camera.main.ScreenToWorldPoint(e.Position);
//			float angle = Vector3.Dot( Vector3.forward , Vector3.Cross( transform.up , touchPosition - transform.position ) );
//			followWind.AddImpuse( angle * Time.deltaTime * touchIntense  , touchPosition );

            Vector2 velocity = e.Finger.DeltaPosition / Time.deltaTime;
            followWind.AttachVelocity(velocity, touchPosition, touchAttachRate * 0.0001f);
        }
    }