Search Unity

Embed a 3d model into a gui window

Discussion in 'Immediate Mode GUI (IMGUI)' started by peirenjun, Sep 19, 2010.

  1. peirenjun

    peirenjun

    Joined:
    Sep 3, 2010
    Posts:
    4
    Hi:
    Now I want to implement a unity Gui window which can show 3d model just like character, car and so on. I can drag, rotate the model in the window.
    so any advice?

    Thanks.
     
  2. peirenjun

    peirenjun

    Joined:
    Sep 3, 2010
    Posts:
    4
    so any could help me ?
     
  3. fred

    fred

    Joined:
    Sep 20, 2010
    Posts:
    15
  4. Jesse Anders

    Jesse Anders

    Joined:
    Apr 5, 2008
    Posts:
    2,857
    Although I haven't tried it myself, I would guess that you could put the object in its own layer, create a camera that renders only that layer and whose viewport is set to a sub-rectangle of the main screen, and then handle mouse clicks that are in that rectangle separately to implement drag rotation and so on.

    Now, I'm not sure exactly what you mean by 'Gui window', but this wouldn't be a separate window of any sort; it would just be a 'picture in picture' effect. If you need something other than that, perhaps you could clarify your question a bit.
     
  5. peirenjun

    peirenjun

    Joined:
    Sep 3, 2010
    Posts:
    4
    Thanks!

    I have read the link page, then tested "RenderTexture".
    yes, it really render a 3d scene to a texture in runtime depends on what's the camera can see.

    Maybe I can use a RenderTexture as my Gui element's background texture which could be dynamic while running, and it looks like in a 3d world. But how to implement the dragging operation is still unsolved.

    So if you get any solutions some time, please share it with me , and so do I.

    My English is poor, thanks for your attention.


     
  6. peirenjun

    peirenjun

    Joined:
    Sep 3, 2010
    Posts:
    4
    To Jesse Anders:
    Thanks for your idea!

    "GUI Window" is that I create a window in my scene by words like "GUI.window(...)" in scripts. When I pop-up the window, it's showing my avatar's model which build by 3dmax studio or maya, and I could drag and rotate the model in the window.

    All I wanted is that above.
     
  7. gulnurr

    gulnurr

    Joined:
    Apr 4, 2021
    Posts:
    2
    Are there any solution? I am searching a solution in these days :( but I did not find yet