Search Unity

TextMesh Pro How to rotate a TextMesh Pro independently from the MeshRenderer or the parent object

Discussion in 'UGUI & TextMesh Pro' started by Abeginner, Mar 27, 2018.

  1. Abeginner

    Abeginner

    Joined:
    Mar 28, 2016
    Posts:
    15
    Is it possible to rotate the TextMesh or the TextMesh Pro component independently from the object where the MeshRenderer is attached?

    If I rotate the TextMeshPro component, the object support transformation, the whole gameobject rotates, not only the text..

    Am I doing something wrong?
     
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Typically the GameObject that contains the text component should not contain any other components that require a renderer. This object might contain layout components or similar components. As such, rotating the transform of this object should only affect the text component itself.

    What kind of structure / components do you have on that object? Can you list them?

    What are you trying to accomplish?
     
  3. Abeginner

    Abeginner

    Joined:
    Mar 28, 2016
    Posts:
    15
    The object should stay the same but just the text should rotate. Otherwise I have to continue with the original position or I have to change the view in the cad program, export and reimport the asset.
     
  4. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    In Unity, the Transform / RectTransform of objects defines their position, rotation and scale.

    Without a better understanding of the object hierarchy you are working with it is hard to provide suggestions. Can you provide an image that shows the hierarchy of objects?

    Depending on how you have things setup, you should be able to rotate the transform of the text object without affecting any of your other objects.