Search Unity

Unity UI How do I make an collection of object rotating on the ui. (With physics)

Discussion in 'UGUI & TextMesh Pro' started by sistercrystal, Aug 17, 2018.

  1. sistercrystal

    sistercrystal

    Joined:
    Jan 12, 2016
    Posts:
    10
    How do I make an collection of object rotating on the ui. (With physics). I want the title to have a box with a sphere in it that is falling because it's rotating. I know how to do that but I don't know how to put it in the ui.
     
  2. Hosnkobf

    Hosnkobf

    Joined:
    Aug 23, 2016
    Posts:
    1,096
    You cannot combine physics with UI components.
    What you can do is making a kind of "iframe". So you can have a camera viewing some physics elements (either 2D or 3D) and that camera renders it into a RenderTexture.
    In the UI you can then create a "Raw Image" and assign that render texture to it. This way you can see the scenery inside the UI.