Results 1 to 6 of 6

Thread: Camera looking thru camera - can it be done?

  1. #1
    Junior Member Newbie
    Join Date
    Oct 2002
    Location
    Florida
    Posts
    15

    Camera looking thru camera - can it be done?

    I'm trying to do an odd scene: Picture a viewscreen on some spaceship showing different angles outside the ship, but on a large screen (low res is ok)...meanwhile, the ship may be moving, and your own character may move around the moving ship. Can this be done?

    Just looking for how to implement the viewscreen .
    The great pop-tart GAWD of Mt. Kellogs

  2. #2
    Junior Member Newbie
    Join Date
    Nov 2002
    Location
    netherlands
    Posts
    15

    Re: Camera looking thru camera - can it be done?

    You could use the rotations and translations that the ship goes through for the player to position him in the ship (like you would when the player is motionless within the ship) and then add rotations and translations that move the player. so:


    model plr locally
    model ship locally (don't forget plr pos in ship)
    model plr same as ship
    place plr in ship by translating plr
    origin to plr pos in ship.
    world model

    Thay way, both ship modelling and local plr modelling apply to the plr, and if the plr walks away from local origin it'll be like walking away from the plr pos in the ship.

    hope it makes some sense

    ps. there are alot of ways to reach this I think

  3. #3
    Senior Member OpenGL Guru
    Join Date
    Jun 2000
    Location
    Gastonia, NC, USA
    Posts
    2,068

    Re: Camera looking thru camera - can it be done?

    Yes, you can have diffrent views.
    Look at Nate Robins openGL tutor, link on my website for it.
    http://www.angelfire.com/linux/nexusone/

    Originally posted by KShots:
    I'm trying to do an odd scene: Picture a viewscreen on some spaceship showing different angles outside the ship, but on a large screen (low res is ok)...meanwhile, the ship may be moving, and your own character may move around the moving ship. Can this be done?

    Just looking for how to implement the viewscreen .

  4. #4
    Junior Member Newbie
    Join Date
    Nov 2002
    Location
    netherlands
    Posts
    15

    Re: Camera looking thru camera - can it be done?

    Ah, I now see I was answering a different question then yours. The viewing was the prob - *doh*

  5. #5
    Senior Member Regular Contributor
    Join Date
    Dec 2001
    Location
    Belmont, CA, USA
    Posts
    216

    Re: Camera looking thru camera - can it be done?

    Search for this: "render to texture". That's what you want to do, right? Render some other view onto a texture and then apply the texture to the viewscreen.

  6. #6
    Junior Member Newbie
    Join Date
    Oct 2002
    Location
    Florida
    Posts
    15

    Re: Camera looking thru camera - can it be done?

    Yeah, you're right. I think I've found a tutorial to do this. Thanks!
    The great pop-tart GAWD of Mt. Kellogs

Similar Threads

  1. Looking with Camera?
    By GhostMonkey in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 04-24-2012, 11:42 AM
  2. [Camera] Can't make the camera move appropriately
    By onion_bread in forum OpenGL ES
    Replies: 0
    Last Post: 12-01-2011, 07:36 PM
  3. Camera Position / Camera Angle / Camera Target Position
    By bobGL in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 04-02-2007, 09:28 AM
  4. Camera
    By Rajiv Mishra in forum OpenGL: Basic Coding
    Replies: 9
    Last Post: 09-15-2001, 04:37 AM
  5. Camera
    By wrelgamal in forum OpenGL: User Software
    Replies: 0
    Last Post: 04-29-2001, 02:36 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean