/// <summary> /// Instantiates a bone at the specified point. /// </summary> private void CreateBoneFromJoint(Joint joint) { var boneData = new BoneData(idCounter++, joint.JointData.id, joint.JointData.id, 1f); currentBone = Bone.CreateAtPoint(joint.center, boneData); currentBone.startingJoint = joint; }
/** Instantiates a bone at the specified point. */ private void CreateBoneFromJoint(Joint joint) { Vector3 point = joint.center; point.z = 0; //currentBone = ((GameObject) Instantiate(bonePreset, point, Quaternion.identity)).GetComponent<Bone>(); currentBone = Bone.CreateAtPoint(point); currentBone.startingJoint = joint; }
private Bone CreateBoneBetween(Joint startingJoint, Joint endingJoint, BoneData data) { var bone = Bone.CreateAtPoint(startingJoint.center, data); PlaceConnectionBetweenPoints(bone.gameObject, startingJoint.center, endingJoint.center, CONNECTION_WIDTH); bone.startingJoint = startingJoint; bone.endingJoint = endingJoint; return(bone); }