Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Bug TMP_InputField behaves incorrectly when placed horizontally in 3D canvas

Discussion in 'UGUI & TextMesh Pro' started by hatto44, Sep 9, 2023.

  1. hatto44

    hatto44

    Joined:
    Jan 15, 2018
    Posts:
    13
    I am placing an inputfield in 3D space.
    I create a canvas, make it a world space, and assign the main camera to it.
    We place the TMP_InputField there.
    Set the rotation of the canvas to 0,0,0,
    TMP_InputField rotation is also set to 0,0,0, it works fine.
    However, if I rotate either of them to rotation 90,0,0, mouse operations for input such as caret and select do not work well.
    After much experimentation, I think the rotation setting may be upsetting the mouse input.
    It is not completely inoperable, but it is clear that the behavior is not correct.
    I would like to position the input field horizontally as shown in the image.
    Text Mesh Pro 3.0.6.

    スクリーンショット 2023-09-09 11.33.41.png スクリーンショット 2023-09-09 11.34.16.png
     
  2. hatto44

    hatto44

    Joined:
    Jan 15, 2018
    Posts:
    13
    Self resolved.
    I don't know if this is a bug or if it is spec'd that way, but by setting the rotation to 89.99 degrees instead of 90 degrees, it worked fine.
    I suspect that there is a part of the original program that calculates 90 degrees as 0 or 180.
    If the rotation was shifted even slightly by 0.001 degree, it worked correctly.