0
ScatterViews, Touch Events and Manipulators
This discussion was imported from CodePlex
Darkounet789 wrote at 2014-02-24 16:15:
Hi everyone !
I added a 3d viewport inside a scatterview item. So I had to manually add a manipulator to the cameracontroller in order to catch the manipulation events on the viewport, otherwise the scatterview catch it. I did it this way :
Is there any workaround about this ?
Thanks in advance ! Regards.
(Sorry for my bad english...)
I added a 3d viewport inside a scatterview item. So I had to manually add a manipulator to the cameracontroller in order to catch the manipulation events on the viewport, otherwise the scatterview catch it. I did it this way :
private void HV3DTouchDown(object sender, TouchEventArgs e)
{
CameraController cameraController = Viewport3D.CameraController;
try
{
Manipulation.AddManipulator(Viewport3D, e.TouchDevice.AsManipulator());
}
catch
{
Console.WriteLine("Error occured in Sketch3D.HV3DTouchDown");
}
e.Handled = true;
CaptureTouch(e.TouchDevice);
}
private void HV3DTouchLeave(object sender, TouchEventArgs e)
{
CameraController cameraController = Viewport3D.CameraController;
try
{
Manipulation.RemoveManipulator(cameraController, e.TouchDevice.AsManipulator());
}
catch
{
Console.WriteLine("Error occured in Sketch3D.HV3DTouchLeave");
}
e.Handled = true;
CaptureTouch(e.TouchDevice);
}
But now, I would like to catch the manipulation on a manipulator (or any other 3D object in my scene) and I can't figure out how to achieve it, because of the AddManipulator method which only takes a UIElement and not a UIElement3D...
Is there any workaround about this ?
Thanks in advance ! Regards.
(Sorry for my bad english...)
Customer support service by UserEcho