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.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Change axis of rotation

Discussion in 'Getting Started' started by Bastoner94, Apr 13, 2022.

  1. Bastoner94

    Bastoner94

    Joined:
    Mar 28, 2022
    Posts:
    5
    Hello huys, I'm new to Unity. I want to rotate a TextMesh, i tried this:

    Text.gameObject.transform.Rotate(new Vector3(0, 1, 0) * RotatingSpeed);

    But the y axis around which it rotates is at the beginning of the text and not in the middle. How could I rotate around the middle?
     
  2. AntonioNoack

    AntonioNoack

    Joined:
    Mar 26, 2020
    Posts:
    7
    You could align your text on its center (I know I am late, but maybe sb else finds it useful)