Search Unity

Freeze content displayed on camera

Discussion in 'Scripting' started by Inverse, Jul 19, 2009.

  1. Inverse

    Inverse

    Joined:
    Jul 13, 2009
    Posts:
    10
    Hi guys, this is want I am trying to do: I'd like to be able to "freeze" a camera, in the sense that I don't want it to update what it's being displayed, no matter if the objects are moving or not.
    A way of doing this would be to make the camera render to a texture and then display that texture in a plane that covers the entire viewport, then the image being displayed would be the same until I felt like updating it. This is not my point however, as this would still require a functional camera, and the reason I want this is to speed up some calculations that would span several frames, without the overhead of rendering the world (which would have not changed) in all those frames.

    I'm not sure if I managed to explain my goal clearly, I just suck at making my point across. If ou can't understand that tel lme and i'll try to explain it better :).

    Thanks for your time :)
     
  2. CoherentInk

    CoherentInk

    Joined:
    Jul 16, 2006
    Posts:
    216
  3. Tom163

    Tom163

    Joined:
    Nov 30, 2007
    Posts:
    1,290
    Code (csharp):
    1.  
    2.     Time.timeScale = 0;
    3.  
    Will pause your entire game world. Scripts still run, so you can have the GUI active, etc. - but physics, movement, particles, everything run by the engine is frozen.