Hello Guest

Author Topic: Tk2dCamera Picture in Picture effect?  (Read 4773 times)

oug

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 32
    • View Profile
Tk2dCamera Picture in Picture effect?
« on: October 05, 2015, 11:06:44 am »
I was wondering if it would be possible to create a so called picture-in-picture effect with the tk2dCamera?
I want to run a 'default' camera over my scene and I want to have a smaller TV-like square that follows a specific target within the scene.

It seems that I'm missing something? This can't be that hard right?

This effect:


I'm already using two tk2dCamera's in my scene (one for the HUD and one for the scene) because I need to zoom in and out with the scene camera, without the HUD being affected, which works like a charm. But I can't seem to set the third camera to a single square (it renders the whole sceen by default).

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Tk2dCamera Picture in Picture effect?
« Reply #1 on: October 05, 2015, 11:18:29 am »
You can use the normalized viewport to clip output region.

oug

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: Tk2dCamera Picture in Picture effect?
« Reply #2 on: October 05, 2015, 11:42:34 am »
You can use the normalized viewport to clip output region.
Ah! Keeping the native and preview resolution in the same aspect (or the same) is the trick. I was trying to fix the square shape of the camera by tweaking these variables!

Thanks!