//Get Proxy Position and Orientation generic function for two haptic devices public void GetTwoProxyValues() { /*Two Proxy Position*/ //Convert IntPtr to Double3Array //myTwoProxyPosition = ConverterClass.ConvertIntPtrToDouble6(PluginImport.GetDevicePosition()); myTwoProxyPosition = ConverterClass.ConvertIntPtrToDouble6(PluginImport.GetProxyPosition()); //Attach the Cursor Node Vector3 positionCursor1 = new Vector3(); Vector3 positionCursor2 = new Vector3(); //Assign value to position vector positionCursor1 = ConverterClass.ConvertDouble3ToVector3(ConverterClass.SelectHalfdouble6toDouble3(myTwoProxyPosition, 1)); positionCursor2 = ConverterClass.ConvertDouble3ToVector3(ConverterClass.SelectHalfdouble6toDouble3(myTwoProxyPosition, 2)); //Assign Haptic Values to Cursor myHapticClassScript.hapticCursor.transform.position = positionCursor1; //Assign Haptic Values to Cursor myHapticClassScript.secondHapticCursor.transform.position = positionCursor2; //Proxy Orientation //Convert IntPtr to Double4Array myTwoProxyOrientation = ConverterClass.ConvertIntPtrToDouble8(PluginImport.GetProxyOrientation()); //Attach the Cursor Node Vector4 OrientationCursor1 = new Vector4(); Vector4 OrientationCursor2 = new Vector4(); //Assign value to orientation vector OrientationCursor1 = ConverterClass.ConvertDouble4ToVector4(ConverterClass.SelectHalfdouble8toDouble4(myTwoProxyOrientation, 1)); OrientationCursor2 = ConverterClass.ConvertDouble4ToVector4(ConverterClass.SelectHalfdouble8toDouble4(myTwoProxyOrientation, 2)); //Assign Haptic Values to Cursor myHapticClassScript.hapticCursor.transform.rotation = new Quaternion(OrientationCursor1.x, OrientationCursor1.y, OrientationCursor1.z, OrientationCursor1.w); //Assign Haptic Values to Cursor myHapticClassScript.secondHapticCursor.transform.rotation = new Quaternion(OrientationCursor2.x, OrientationCursor2.y, OrientationCursor2.z, OrientationCursor2.w); }