Announcement

Collapse
No announcement yet.

Controlling the viewport?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Controlling the viewport?

    Hi!
    Im a bit from the Unity-world. and in Unity most of the viewport is controlled by the camera settings.. so for instance.. you might have two cameras in your scene where both of em are at different locations but they both have a width of 50% of the screen and a height thats 100% of the screen, and the 2:nd might be positioned half on the screen.. which basically would create a split screen like this:

    -----------------------
    | | |
    | | |
    | | |
    | | |
    | | |
    ------------------------

    So now to my question.. is there anyway to create the same thing in UE4?
    And if I need to do some C++-hacking then please point me to the correct file since Im still quite new to c++ but not with programming in general.


    Br,
    Inx

    #2
    I'm still pretty new to UE4 myself, but could you use the camera-linked materials shown in the GDC demo?

    Maybe there's a way to overlay two materials as a UI onto the screen at different ratio's, then link them to two different camera's.

    Just brainstorming.

    Comment


      #3
      Originally posted by Sonshi View Post
      I'm still pretty new to UE4 myself, but could you use the camera-linked materials shown in the GDC demo?

      Maybe there's a way to overlay two materials as a UI onto the screen at different ratio's, then link them to two different camera's.

      Just brainstorming.
      Yes, that would be one way of doing it.
      However I don't thinks its a very elegant way of doing it since this type of control should not be on a "material-level" more on a "game-settings-level" or on a "camera-level"... or maybe even on a "player-class-level"..
      but yes, your way would work

      Comment


        #4
        Originally posted by Inx View Post
        Yes, that would be one way of doing it.
        However I don't thinks its a very elegant way of doing it since this type of control should not be on a "material-level" more on a "game-settings-level" or on a "camera-level"... or maybe even on a "player-class-level"..
        but yes, your way would work
        Yeah I was thinking that it would be more contained if there was a global viewport-splitting section rather than having each material be in charge of the cameras.

        Using the method I described seems more like something that would be useful for a picture-in-picture scenario.

        Comment


          #5
          Right now there is no project settings way of manipulating the screen splits, though it is on my list to expose. You can, however, modify the splitscreen configurations in GameViewportClient.cpp

          We didn't feel it was good object design to have the cameras needing to be aware of the number of characters and driving the viewport layout as that makes setting up and handling camera switches in multi-player games far more complex among other issues.

          Comment


            #6
            Marc, we want to have a game view that spans across a triple wide set of displays, and we'd like to have many players interacting within this view...

            At first I thought a way to achieve the triple wide view might be to go into GameViewportClient.cpp, make a three player ESplitScreenType type that has FPerPlayerSplitScreenData set to divide the screen into three columns, and then have each of my three game cameras act as different "players" that are controlled by the same input... does that sound right? Is there a way to use camera objects to define "viewports" instead of player objects?

            Comment

            Working...
            X