// Update is called once per frame void Update() { HandOffset handOffset = externHand.NextHandOffsetSync(curFrame); //HandOffset handOffset = new HandOffset(); handManager.SetHandState(handOffset); curFrame++; }
public static CharacterPosition GetCharacterPosition() { HandOffset leftOffs = GetLeftHandOffs(); return(new CharacterPosition { position_head = GetXRNodeWorldPosRot(XRNode.Head).Position, rotation_head = GetXRNodeWorldPosRot(XRNode.Head).Rotation, position_leftHand = GetXRNodeWorldPosRot(XRNode.LeftHand).Position + leftOffs.LeftHandPos, rotation_leftHand = GetXRNodeWorldPosRot(XRNode.LeftHand).Rotation *leftOffs.LeftHandRot, position_rightHand = GetXRNodeWorldPosRot(XRNode.RightHand).Position, rotation_rightHand = GetXRNodeWorldPosRot(XRNode.RightHand).Rotation }); }
public static CharacterPosition GetCharacterInfo() { HandOffset leftOffs = GetLeftHandOffs(); return(new CharacterPosition { headPos = WorldController.GetXRNodeWorldPosRot(XRNode.Head).Position, headRot = WorldController.GetXRNodeWorldPosRot(XRNode.Head).Rotation, leftHandPos = WorldController.GetXRNodeWorldPosRot(XRNode.LeftHand).Position + leftOffs.LeftHandPos, leftHandRot = WorldController.GetXRNodeWorldPosRot(XRNode.LeftHand).Rotation *leftOffs.LeftHandRot, rightHandPos = WorldController.GetXRNodeWorldPosRot(XRNode.RightHand).Position, rightHandRot = WorldController.GetXRNodeWorldPosRot(XRNode.RightHand).Rotation }); }
public OgreHandStateManager(string handStateFilePath, float ogreScale) { try { reader = new StreamReader(handStateFilePath, System.Text.Encoding.Default, false); }catch(IOException e) { Console.WriteLine(e.ToString()); // System.Environment.Exit(-1); } this.ogreScale = ogreScale; InitBonesAndTree(); InitBoneMapping(); initHandState = GetHandStateFromFile(); currentOffset = new HandOffset(); }
public void Write(BinaryWriter writer) { writer.Write(NotUsed1); writer.Write(NotUsed2); writer.Write(HairR); writer.Write(HairG); writer.Write(HairB); writer.Write((byte)0); writer.Write(MovementFlags); writer.Write(EntityFlags); writer.Write(Scale); writer.Write(BoundingRadius); writer.Write(BoundingHeight); writer.Write(HeadModel); writer.Write(HairModel); writer.Write(HandModel); writer.Write(FootModel); writer.Write(BodyModel); writer.Write(BackModel); writer.Write(ShoulderModel); writer.Write(WingModel); writer.Write(HeadScale); writer.Write(BodyScale); writer.Write(HandScale); writer.Write(FootScale); writer.Write(ShoulderScale); writer.Write(WeaponScale); writer.Write(BackScale); writer.Write(Unknown); writer.Write(WingScale); writer.Write(BodyPitch); writer.Write(ArmPitch); writer.Write(ArmRoll); writer.Write(ArmYaw); writer.Write(FeetPitch); writer.Write(WingPitch); writer.Write(BackPitch); BodyOffset.Write(writer); HeadOffset.Write(writer); HandOffset.Write(writer); FootOffset.Write(writer); BackOffset.Write(writer); WingOffset.Write(writer); }