我试图修改Joint类的JointType,这是代码的一部分:
Joint currentJoint = new Joint();
SkeletonPoint position = currentJoint.Position;
currentJoint.TrackingState = JointTrackingState.NotTracked;
position.X = -1;
position.Y = -1;
position.Z = -1;
currentJoint.Position = position;
currentJoint.JointType = JointType.AnkleLeft;
if (_joint._jointType == "AnkleLeft")
currentJoint.JointType = JointType.AnkleLeft;
if (_joint._jointType == "AnkleRight")
currentJoint.JointType = JointType.AnkleRight;
if (_joint._jointType == "ElbowLeft")
我无法让这一行currentJoint.JointType = JointType.AnkleLeft;
起作用,它说
Joint.JointType'无法分配给 - 它是只读的
我试过这样:
JointType cjoint = currentJoint.JointType;
cjoint = JointType.AnkleLeft;
currentJoint.JointType = cjoint;
但它不起作用。
提前谢谢!