Hello guys,
I would like to ask you if there is any example of a main window rending the character view, and a sub-window rendering a different view…
The sub window as part of main window.
Thank.
Giancarlo
Hello guys,
I would like to ask you if there is any example of a main window rending the character view, and a sub-window rendering a different view…
The sub window as part of main window.
Thank.
Giancarlo
You can look through this thread.
I think the suggestion on making your model in its own layer and having a camera with a guiscipt that looks at this layer maybe what you are looking for. I my self have not used this, but it sounds logical.
I just remember seeing the thread and thought it will help you.
Cheers.
Hi,
You might already have this completed, but just in case. It has been something I have been playing with recently.
Place the second camera in the scene view where you would like it (for a minimap I placed it above my FPS guy with X rotation at 90 pointing down). Attach a Smooth Follow component with the target being the First Person Controller (or whatever you want it to look at). I put it at a height of 100. At first it showed nothing but after playing around I realized you have to set the depth to higher than your main camera (I put it at 1) and change the Culling Mask to Default. In the Normalized View Port Rect X and Y are where you want the window and W and H are the size. It is important to note that 1 is 100% of the window so you probably want it smaller so that it does not completely cover the main camera view. I set mine to W .15 and H .25. Turn off the Audio Listener of your secondary camera and bang! Bob’s your Uncle. Leave the GUILayer clicked if you want little icons or whatever.
All these can be found in the Inspector part of your layout once you have the camera in your hierarchy.
Hope this helps! I probably am missing something as I kind of chunked my way through it.
Cal
Hey Caldepen, how, for the love of Christ, do you keep the terrain from being invisible on the render texture?
The trouble I ran into was when I had the Culling Mask on the secondary camera set incorrectly. After some trial and error I changed it to default and it showed the terrain and everything else properly. But other issues may be that your height is off on the Smooth Follow component attached to your camera or something I did not encounter. If it is showing your character and other assets and not the terrain then I do not know. Try changing the terrain to a normal asset (add a mesh collider that replaces the terrain collider). Test it and then undo changes as you obviously do not want to leave it that way (mess up other things probably). Of course do all these kind of things at your own risk (I have done that before and no harm done). By doing this you may isolate where the problem is.
I will put up a screen grab shortly of the settings but I tried it with Picasa and my posts did not get approved or something. Maybe Google and Unity are bitter enemies or something…