sync the cameras of different HelixViewport3Ds

Anonymous 9 years ago 0
This discussion was imported from CodePlex

lightxx wrote at 2012-12-19 08:49:

I'm designing a UI where i want to exclude a couple of Visual3Ds from hit - testing.

So I thought it would probably be a good idea to use two overlapping HelixViewport3Ds and set IsHitTestVisible to false on one of them to exclude those Visual3Ds from hit-testing.

Now, how do i sync the cameras of those two HelixViewport3Ds so when i pan/zoom/... the first one the second one stays in snyc?

Or is there a better approach to this problem?

lightxx wrote at 2012-12-19 09:14:

ok. the trick was to do two-way bindings. sorry.


<PerspectiveCamera LookDirection="{Binding ElementName=boardView, Path=Camera.LookDirection, Mode=TwoWay}"  Position="{Binding ElementName=boardView, Path=Camera.Position, Mode=TwoWay}" UpDirection="{Binding ElementName=boardView, Path=Camera.UpDirection, Mode=TwoWay}"/>

lightxx wrote at 2012-12-19 09:24:

the Viewports still have a slight offset ... weird.

objo wrote at 2012-12-19 09:27:

Did you try using UIElement3Ds


lightxx wrote at 2012-12-19 10:03:

thanks for pointing me in the right direction!!!