It works on Pixelsense

Anonymous 9 years ago 0
This discussion was imported from CodePlex

JohnSourcer wrote at 2012-12-11 20:28:

Hi Objo,

After many hours of working with your toolkit, I managed to get it working on Pixelsense device SDK 2.

I have it in a ScatterViewItem and am able to rotate and zoom the 3D object (a globe in my case). I do however wonder if I have the code right (it seems to smell a little) and would appreciate any thoughts:


//Grabbed the touch event on the Helix3DViewport

private void HV3DTouchDown(object sender, TouchEventArgs e)
            HelixViewport3D view = sender as HelixViewport3D;
            CameraController cameraController = view.CameraController;
            cameraController.TouchMode = TouchMode.Rotating;
            Manipulation.AddManipulator(cameraController, e.TouchDevice.AsManipulator());
            e.Handled = true;

JohnSourcer wrote at 2012-12-12 10:32:

Never relinqushes the touch though.

objo wrote at 2012-12-13 23:26:

Cool to hear you got it to work! Sorry I have now experience with the Pixelsense SDK. Do you need to add the manipulator to the camera controller on every touch down event?

JohnSourcer wrote at 2012-12-14 06:30:

Nah sorted that out.

When I zoom however, the Axis of the sphere changes but the camera still focuses on the old axis. So if you spin the globe now it goes all over the show. How do you reset the camera controller to view at the globe at the new zoom?