Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Object Rotation using rotating GUI

Discussion in 'Scripting' started by ml1985, Dec 22, 2014.

  1. ml1985

    ml1985

    Joined:
    Dec 29, 2013
    Posts:
    22
    Hi Guys

    I'm currently stuck and would be grateful if someone can help me.

    My aim is to rotate an object by touch rotating a GUI or other interface. The main thing is to have the velocity of rotation of the touch input match the rotation velocity of the object itself.

    I've searched around and haven't found an answer yet and not sure if it is even possible.
     
  2. fire7side

    fire7side

    Joined:
    Oct 15, 2012
    Posts:
    1,819
  3. ml1985

    ml1985

    Joined:
    Dec 29, 2013
    Posts:
    22
    Hi fire7side

    thanks for the suggestion, I see the Gui.RotateAroundPivot function uses a float angle to rotate the Gui object, can it incorporate a transform.rotate function within it?