# How to get the view-projection transformation matrix for the active level editor viewport?

**URL:** <https://forums.unrealengine.com/t/how-to-get-the-view-projection-transformation-matrix-for-the-active-level-editor-viewport/431552>\
**Category:** Mobile\
**Tags:** projection-matrix, unreal-engine, editor, question\
**Created:** [August 13, 2018, 12:03pm UTC](https://forums.unrealengine.com/t/how-to-get-the-view-projection-transformation-matrix-for-the-active-level-editor-viewport/431552 "2018-08-13T12:03:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AirKuma](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AirKuma](https://forums.unrealengine.com/u/AirKuma)\
**Post date:** [August 13, 2018, 12:03pm UTC](https://forums.unrealengine.com/t/how-to-get-the-view-projection-transformation-matrix-for-the-active-level-editor-viewport/431552/1 "2018-08-13T12:03:40Z")

</div>

Sorry for my poor English.

I found [this code](http://pastebin.com/raw/eFRgwqyv).  
It gets a _FSceneViewProjectionData_ from the _ULocalPlayer_, and it uses the _FSceneViewProjectionData_ to calculate a view-projection transformation matrix.

However, I can not find any way to get a _FSceneViewProjectionData_ for level editor viewport because I can not get a _ULocalPlayer_ without starting game.

My questions are

1. How to get a _FSceneViewProjectionData_ for level editor viewport?
2. How to get the active UCameraComponent of level editor viewport? (I can calculate _FSceneViewProjectionData_ from _FMinimalViewInfo_ of the camera)

Please help me, thank you.

---

<div class="post-metadata">

**Author:** ![sranck\_2k](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@sranck\_2k](https://forums.unrealengine.com/u/sranck_2k)\
**Post date:** [February 26, 2019, 9:33pm UTC](https://forums.unrealengine.com/t/how-to-get-the-view-projection-transformation-matrix-for-the-active-level-editor-viewport/431552/2 "2019-02-26T21:33:03Z")

</div>

Did you figure this out? I’m looking for the solution as well.

---

<div class="post-metadata">

**Author:** ![AirKuma](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AirKuma](https://forums.unrealengine.com/u/AirKuma)\
**Post date:** [February 27, 2019, 2:21am UTC](https://forums.unrealengine.com/t/how-to-get-the-view-projection-transformation-matrix-for-the-active-level-editor-viewport/431552/3 "2019-02-27T02:21:13Z")

</div>

(Sorry for my poor English) Still no solution. I switched to use Unity Engine because its editor extensibility is likely better than Unreal Engine. Good luck!
