How to fit content into a specified area of screen at game startup
I'm using Unity3D to develop an interesting medical application. By making it very briefly, we have a very large touch screen, hanging from a wall. This screen is fixed to the wall and can not be moved. Patients could be adults or children. Tall or short people and so on. Before starting the game, we perform a calibration phase that consists in trying to understand more or less what the touch range is. That is, a taller person can reach the highest points on the screen, while a lower person can not. The calibration phase then identifies more or less which area is reachable. The result of the calibration (simplified) is a rectangle. We would like to fit the content of the game made with Unity3D to be included within this rectangle. That is, there is some function in Unity3D that allows you to specify when you start the game where you "draw" the elements of the game by defining a sort of "sub screen"?
Answer by tormentoarmagedoom · Jul 11, 2018 at 07:03 AM
Good day.
Yes, actually is very simple. You only need to create a render texture (can be resized, zoomed, etc..)
I recommend you to create a "screen inside the screen". The best way to learn how to do it i think is to watch some tutotial about creating "radars or minimaps" (they are actually a screen inside the screen).
You will only need to change this little screen size and position when you know the patient range.
I recommend you this manual, is simple, and very efficient.
Bye!