Very good, I am trying to save in a file.txt the coordinates that Kinect gives me of the different Joints of the body in Visual Studio. But as it is an array of type object it does not let me pass to string by the following form: This would be the new part implemented
//Mano Derecha
VariablesGlobales.HandRightX = body.Joints[JointType.HandRight].Position.X;
VariablesGlobales.HandRightY = body.Joints[JointType.HandRight].Position.Y;
VariablesGlobales.HandRightZ = body.Joints[JointType.HandRight].Position.Z;
//ManoIzquierda
VariablesGlobales.HandLeftX = body.Joints[JointType.HandLeft].Position.X;
VariablesGlobales.HandLeftY = body.Joints[JointType.HandLeft].Position.Y;
VariablesGlobales.HandLeftZ = body.Joints[JointType.HandLeft].Position.Z;
//Cabeza
VariablesGlobales.HeadX = body.Joints[JointType.Head].Position.X;
VariablesGlobales.HeadY = body.Joints[JointType.Head].Position.Y;
VariablesGlobales.HeadZ = body.Joints[JointType.Head].Position.Z;
// Parte central Torso
VariablesGlobales.SpineMidX = body.Joints[JointType.SpineMid].Position.X;
VariablesGlobales.SpineMidY = body.Joints[JointType.SpineMid].Position.Y;
VariablesGlobales.SpineMidZ = body.Joints[JointType.SpineMid].Position.Z;
// Una de las soluciones es hacer un array para cada joint, como ultima opcion
DispatcherTimer dispatcher = new DispatcherTimer();
// Intervalo de tiempo de 1 segundo
dispatcher.Interval = new TimeSpan(0, 0, 1);
dispatcher.Tick += (s, a) =>
{
//MiArray[n] = body.Joints[JointType.HandLeft];
// Estoy guardando toda la informacion necesaria de los 25 joints del body, es decir TODO EL BODY
MiArray[n] = body;
m = 0;
using (StreamWriter sw = new StreamWriter(@"prueba.txt",true))
{
sw.WriteLine(VariablesGlobales.HandLeftX);
sw.WriteLine(VariablesGlobales.HandLeftY);
}