// Update is called once per frame public override void SetSensoPose(Senso.BodyData bodySample) { base.SetSensoPose(bodySample); if (Pelvis != null) { Pelvis.ApplyQuaternion(bodySample.PelvisRotation); } if (Spine != null) { Spine.ApplyQuaternion(bodySample.SpineRotation); } if (Neck != null) { Neck.ApplyQuaternion(bodySample.NeckRotation); } if (RightLeg != null && RightLeg.Length == 3) { // Thigh RightLeg[0].ApplyQuaternion(bodySample.HipRightRotation); // Knee RightLeg[1].ApplyQuaternion(bodySample.KneeRightRotation); // Foot RightLeg[2].ApplyQuaternion(bodySample.FootRightRotation); } if (LeftLeg != null && LeftLeg.Length == 3) { // Thigh LeftLeg[0].ApplyQuaternion(bodySample.HipLeftRotation); // Calf LeftLeg[1].ApplyQuaternion(bodySample.KneeLeftRotation); // Foot LeftLeg[2].ApplyQuaternion(bodySample.FootLeftRotation); } if (RightArm != null && RightArm.Length == 3) { // Clavicle RightArm[0].ApplyQuaternion(bodySample.ClavicleRightRotation); // Shoulder RightArm[1].ApplyQuaternion(bodySample.ShoulderRightRotation); // Elbow RightArm[2].ApplyQuaternion(bodySample.ElbowRightRotation); } if (LeftArm != null && LeftArm.Length == 3) { // Clavicle LeftArm[0].ApplyQuaternion(bodySample.ClavicleLeftRotation); // Shoulder LeftArm[1].ApplyQuaternion(bodySample.ShoulderLeftRotation); // Elbow LeftArm[2].ApplyQuaternion(bodySample.ElbowLeftRotation); } Position.localPosition = bodySample.PelvisPosition; }
public override void SetSensoPose(Senso.BodyData bodySample) { Quaternion curCameraRotation = Quaternion.identity; if (m_controller.IsAlive) { var controller = m_controller.Target as SensoBaseController; if (controller.HeadPositionSource != null) { curCameraRotation = controller.HeadPositionSource.rotation; } } SetCameraTransform(bodySample.CameraPosition, bodySample.CameraAzimuth, curCameraRotation); }
abstract public void SetSensoPose(BodyData newData);
public virtual void SetSensoPose(BodyData newData) { Pose = newData; }