I create a virtual museum on unity. When a player comes to the exhibit and clicks on E, a detailed description should appear and the camera 360. But if everything is clear with the camera, how to make the “window” itself?

Closed due to the fact that the essence of the question is not clear to the participants of the rjhdby , Kromster , αλεχολυτ , Denis Bubnov , Grundy Apr 18 '17 at 13:56 .

Try to write more detailed questions. To get an answer, explain what exactly you see the problem, how to reproduce it, what you want to get as a result, etc. Give an example that clearly demonstrates the problem. If the question can be reformulated according to the rules set out in the certificate , edit it .

1 answer 1

What you want to do is a UI (User Interface) system. For UI , Unity has special components that must be located on the Canvas (Холсте) . Roughly speaking, you can make a bunch of items that will be displayed on a canvas with WorldSpace display. Put triggers around each exhibit and write a script so that at the moment of OnTriggerStay() , if E pressed, a certain GameObject activated.

You can let the rays by pressing E , which also gives about the same result. Only in the exhibit will have to get. But it will be possible to make it cooler: automatically open the tablet, as it were, if the player is looking at it. This is how it is.

Lord, a lot like this is realizable! At least the same Vector3.Distance() apply and catch clicking on E

In any case, you need to make a canvas, and to familiarize yourself with how the UI system in Unity , you can learn about these lessons . And of course, do not forget about the documentation and effort!

  • Will the controlled camera inside the UI succeed?
  • @ Alexander UI - this is the same GameObject, which has its Transfrom - kitscribe