我想从包含关节/x/y/z 的文本文件创建骨架 我在创建关节时遇到问题
string[] JointPoints = line.Split('/');
float x = (float)Convert.ToDouble(JointPoints[1]);
float y = (float)Convert.ToDouble(JointPoints[2]);
float z = (float)Convert.ToDouble(JointPoints[3]);
Joint j = new Joint();
var pos = j.Position;
switch (JointPoints[0].ToUpper())
{
case "HEAD":
//j.JointType = JointType.Head; <--- Can't do this,
pos.X = x;pos.Y = y;pos.Z = z;
playSkeleton.Joints[JointType.Head] = j;
break;