Search Unity

Apple pencil 2 doesn't send altitude and azimuth angle.

Discussion in 'iOS and tvOS' started by TomekLKE, Jul 3, 2019.

  1. TomekLKE

    TomekLKE

    Joined:
    Oct 5, 2018
    Posts:
    7
    Hey,
    I am building a game with Apple Pencil support, I can get the pen tilt angle and pressure from Apple Pencil 1st gen, but the new (2nd gen) only reports the pressure, the angles are at 0. Does anybody have an idea how I can access these values?

    Also how would I be able to detect double tap in the Apple Pencil 2?
    Thanks in advance.
     
    Lars-Steenhoff likes this.
  2. TomekLKE

    TomekLKE

    Joined:
    Oct 5, 2018
    Posts:
    7
  3. whitebozo

    whitebozo

    Joined:
    Oct 27, 2014
    Posts:
    29
    I would also love to know why the pencil 2 can't detect angle. As for double tap it is the same as detecting a double tap with a finger, either put inside a scope that only detects "TouchType.Stylus"
     
    TomekLKE likes this.
  4. TomekLKE

    TomekLKE

    Joined:
    Oct 5, 2018
    Posts:
    7
    Thanks for the answer, regarding the double tap, I didn't mean tapping with pen on the screen but with finger on the pen, apple pencil 2 has that functionality, did you mean that?
     
  5. whitebozo

    whitebozo

    Joined:
    Oct 27, 2014
    Posts:
    29
    Oh sorry I thought you meant the screen. As for the barrel button on the stylus I have yet to figure this out. I have yet to have any luck with Unity's old Input system, I'm currently trying to figure this out with the new input system but I'm also running into issues.
     
  6. Gekigengar

    Gekigengar

    Joined:
    Jan 20, 2013
    Posts:
    738
    Which method did you use? Can you link me?
    I can't find any Input.Azimuth/Altitude in the documentations.