Hi,
I´m getting really confused about what a viewport is in the unreal engine. Hope somebody can help me! =/
Here is where I am right now:
I have a SceneCaptureComponent2D
placed somewhere. Since it can render the scene into a texture, there has to be a projection from the scene to the texture, doesn´t it?
I know that a SceneCapture has a TextureRenderTarget2D
and with it you can get a RenderTarget
with this code:
USceneCaptureComponent2D * RenderComponent
UTextureRenderTarget2D* RenderTexture = RenderComponent->TextureTarget;
FRenderTarget *RenderTarget = RenderTexture->GameThread_GetRenderTargetResource();
I know that a FSceneView
inherits RenderTarget
and has a methods to project world to screen and vice versa.
And a ULocalPlayer
for example has a FViewPort
which has a FViewPortClient
which has a FSceneView
, and can call ProjectWorldToScreen(...)
. But a SceneCaputeComponent2D
does not have a Viewport for some reason!
Right now I dont get it any more. Can anyone tell me please what any of these classes should represent and how I can use them? Any Information would be helpful!
Thanks