ViewLocation & ViewRotation are not initialised in FSceneView in realtime editor viewport.
Hi, I am writing an Custom render pass to do some custom OpenGL code into the engine. In order to do this I need to convert the matrix space (similar to the stereoscopic matrix). This math depends on FSceneView having a correct ViewLocation and ViewRotation. It appears that these are not set (as the comments say) by the creation of the ViewMatrix, but by the ULocalPlayer::CalcSceneView function. Which means the ViewLocation & ViewRotation values are undefined values while the editor is in realtime view mode.
I can happily create a patch to fix this, but I am curious if this is the intended use of those variables or not.
I'm curious where you're seeing this. The code changed a bit in main (what will become 4.8) but all the needed values are initialized in the FSceneViewInitOptions that are passed to the FSceneView constructor.
In the case of realtime editor viewports, this happens in FEditorViewportClient::CalcSceneView.
If there is a case where they are uninitialized can you provide a callstack? That will give me more context as to what the code is doing.
answered Mar 20 '15 at 08:23 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here