Search Unity

Using TextMeshPro as an ARSession tracked image prefab in ARFoundation

Discussion in 'AR' started by Deleted User, Oct 3, 2019.

  1. Deleted User

    Deleted User

    Guest

    I posted this in the Unity UI & TextMeshPro thread but I think this is a more suitable thread for it.

    I created a TextMeshPro prefab to use as a prefab for an ARSession tracked image (AR Tracked Image Manager component). All good and well but the prefab is always instantiated 90 degrees on top of the tracked image.

    This is fine if the tracked image is flat on a horizontal surface - the text appears upright with no issues. But if the tracked image is on a vertical surface then the text appears facing down 90 degrees.

    Even if I fiddle with the X rotation of the prefab so it's defined at 90 degrees, which means flat on the editor's surface, there's no difference at runtime. The text always appears 90 degrees perpendicular in relation of the tracked image.

    What I want is to be able to track an image that is on a vertical surface and be able to instantiate the TextMeshPro prefab also vertically. How can I achieve this? Thanks!