Search Unity

how can I see what a camera sees

Discussion in 'Editor & General Support' started by tripdragon, Jun 2, 2005.

  1. tripdragon

    tripdragon

    Joined:
    May 7, 2005
    Posts:
    38
    And also how can I just use my current view as the cameras view when I press play ?? I HATE haveing it jump when I have not set my camera correctly but my view is
     
  2. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    1) Use the 2 split layout. This way you keep the sceneview and game view.

    2) Select the camera and use Align with view to place the game camera exactly like the scene view's camera
     
  3. tripdragon

    tripdragon

    Joined:
    May 7, 2005
    Posts:
    38
    In blender all I do is change my view around and then press shift+0 and the camera adjusts to that direct sight, could we get one of those kind of short cuts ???
     
  4. jamie

    jamie

    Joined:
    May 25, 2005
    Posts:
    178
    I understand there is a 'point at target' in the works for both lights and camera's. I look forward to that being implemented.
     
  5. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    A simple script which just rotates to look at a target point goes like this:
    Just add the script to the camera or light which should follow some transform.
    After adding the script, simply assign the target to be the target you want the camera or light to look towards.

    Code (csharp):
    1.  
    2. var target : Transform;
    3. function Update ()
    4. {
    5. if (target)
    6. {
    7. † † var direction = target.position - transform.position;
    8. † † transform.rotation = Quaternion.LookRotation (direction);
    9. }
    10. }
    11.  
     
  6. NicholasFrancis

    NicholasFrancis

    Joined:
    Apr 8, 2005
    Posts:
    1,587
    See Joe's reply, above ;-)