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
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Problem with GUIUtility.RotateAroundPivot

Discussion in 'Scripting' started by ptz4ever, Oct 5, 2013.

  1. ptz4ever

    ptz4ever

    Joined:
    Nov 2, 2012
    Posts:
    5
    Hi all. So i got a strange problem with UI elemtnt rotation.
    Here is a small demo:
    As you can see on demo, texture doesn't turn around its center. It moves up and down, or right and left.
    Here is texture:
    $radar_remote_player 1.png
    And code of demo:
    http://pastebin.com/ZCXTDG5y

    Tnx :cool:
     
  2. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Seems fine here, both the web player and the code.

    Don't use FixedUpdate, though...use this instead:

    Code (csharp):
    1.     void Update () {
    2.         angle += speed * Time.deltaTime;
    3.     }
    --Eric
     
  3. ptz4ever

    ptz4ever

    Joined:
    Nov 2, 2012
    Posts:
    5
    I still got that problem, any ideas?
     
  4. TheRaider

    TheRaider

    Joined:
    Dec 5, 2010
    Posts:
    2,245
    demo works fine for me too.