Quantcast
Channel: Latest Questions on Unity Answers
Viewing all articles
Browse latest Browse all 171066

How to scale and translate world relative to camera

$
0
0
Unity Answers Question At Unite 2012 there was a presentation by the people who made Universe Sandbox. The video can be found here: http://video.unity3d.com/video/6958259/unite-2012-creating-the At about 21:00 someone asks about how they achieve the scale and they answer but with limited detail. Based on what they talked about, they provide the scale and positioning by leaving the camera in one location, and then scaling/translating the objects within the world (so moving everything in the world but leaving the camera at [0,0,0]) My questions are these: (a) how would I efficiently translate all the objects in a scene so it appears the camera is moving, but it is, in fact, staying in the same place. and (b) how would I scale and translate the objects in a scene (when I spin the scroll wheel, for example.) so that it looks like the camera is zooming out or into a point? ie what is the math involved. The guy in the video mentioned something like taking the distance to the nearest object and then using 1/(the distance) as the scale factor. But that left some holes like how much to translate by. (unless I simply misunderstood or missed some detail) Thanks

Viewing all articles
Browse latest Browse all 171066

Latest Images

Trending Articles



Latest Images