example

  • uWintab{

    Tablet.cs{
    mono класс, связанный с библиотекой Lib по управлением пером
    }
    }
    тестовая работа пера
    mono.cs{
    public class mono : MonoBehaviour{
    uWintab.Tablet tablet_;


    void Start(){
    tablet_ = FindObjectOfType<uWintab.Tablet>();
    }
    // Update is called once per frame
    void Update(){
    if (((Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase.Moved) || tablet_.pressure>0.1f)){
    Plane objPlane = new Plane(Camera.main.transform.forward * -1, this.transform.position);
    Ray mRay = Camera.main.ScreenPointToRay(Input.mousePosition);
    float rayDistance;
    if (objPlane.Raycast(mRay, out rayDistance))
    this.transform.position = mRay.GetPoint(rayDistance);
    }
    }
    }
    }