// Update is called once per frame void Update() { SurviveAPIOObject updated; while ((updated = survive?.GetNextUpdated()) != null) { var updatedObject = getObject(updated.Name); Vector3 newPosition = Vector3.zero; Quaternion newRotation = Quaternion.identity; SurvivePose pose = updated.LatestPose; newPosition.x = (float)pose.Pos[0]; newPosition.y = (float)pose.Pos[1]; newPosition.z = (float)pose.Pos[2]; newRotation.w = (float)pose.Rot[0]; newRotation.x = (float)pose.Rot[1]; newRotation.y = (float)pose.Rot[2]; newRotation.z = (float)pose.Rot[3]; updatedObject.transform.localPosition = newPosition; updatedObject.transform.localRotation = newRotation; } }
virtual protected void PoseEvent(IntPtr so, byte lighthouse, SurvivePose pose) { Cfunctions.Survive_default_raw_pose_process(so, lighthouse, pose); //Debug.Log("PoseEvent"); }
protected void LightHouseEvent(IntPtr ctx, byte lighthouse, SurvivePose lighthouse_pose, SurvivePose object_pose) { Cfunctions.Survive_default_lighthouse_pose_process(ctx, lighthouse, lighthouse_pose, object_pose); //Debug.Log("LightHouseEvent"); }