Author Topic: How to embed a 3d model on to an UI  (Read 1842 times)

grant199610

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
How to embed a 3d model on to an UI
« on: November 10, 2014, 10:53:04 PM »
Hi.
I'm designing a small map UI in my 3d game. I want put a 3d earth model on the map UI. But how can I set the UICamera that could display a 3d model.
The attached is my UI design.

Thanks

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: How to embed a 3d model on to an UI
« Reply #1 on: November 10, 2014, 11:19:53 PM »
You need to set up an off-screen camera to render the 3D object into a RenderTexture, then draw this RenderTexture using UITexture like any other widget.

grant199610

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: How to embed a 3d model on to an UI
« Reply #2 on: November 11, 2014, 02:43:32 AM »
HI, ArenMook.
Thanks for your answers.
We'v tested another way to show the 3D model and respond mouse event. We made a transparent UI with a transparent hole in it and we could show the 3d model behind the hole. In order to operate the 3d model such as using mouse rotating it, we captured the main camera mouse click event and mouse screen position in the region of the hole. It seems work.

Thank you anyway.