<div dir="ltr">Hi Roy,<br><div class="gmail_extra"><br><div class="gmail_quote">On 15 October 2015 at 19:27, Roy Arents <span dir="ltr"><<a href="mailto:osgforum@tevs.eu" target="_blank">osgforum@tevs.eu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
Is there any update on this issue?<br>
I seem the run into the same. I'm using osg 3.2.1 if this is solved in a new version I could migrate to a more recent version, but hopefully someone can indicate which version does not have this problem.<br></blockquote><div><br></div><div>Just had a look at your example code, looks to me like the update callback that you are updating the uniforms with is being called before the the Camera's view's matrix is being updating by the viewer. Have a look at the implementation of Viewer::updateTraversal() in OpenSceneGraph/src/osgViewer/Viewer.cpp, you'll see that the update traversal is done then the CamaraManipulator is queried.<br><br></div><div>You will probably then ask "why" it's done in this order, well CameraManipulator's can use the position of nodes to determine the camera position, something that isn't set in stone till after the update traversal.<br></div><div><br></div><div>So how to untangle this? Well you could just override the updateTraversal() to do what you want OR you can doing your own frame() implementation calling the updates between the updateTraversal() and renderingTraversals() OR just rewrite your code to use the osg_ViewMatrix and osg_ViewMatrixInverse uniforms that it provides.<br><br></div><div>Robert.<br></div><div><br> </div></div></div></div>