public void Run() { UpdateCurrentUserState(); CalculateStateChanges(); // BACK UP IN CASE UNITY TRIGGERS FAILED TO COMMUNICATE RESET (Can happen in high speed simulations) if (resetter != null && !inReset && resetter.IsUserOutOfBounds()) { Debug.LogWarning("Reset Aid Helped!"); OnResetTrigger(); } if (inReset) { if (resetter != null) { resetter.ApplyResetting(); //Debug.LogWarning("Reset Calledddd!"); } } else { if (redirector != null) { redirector.ApplyRedirection(); //Debug.LogWarning("Redirection Calledddd!"); } } this.simulationManager.statisticsLogger.UpdateStats(); UpdatePreviousUserState(); UpdateBodyPose(); }
void LateUpdate() { //Debug.Log("Hi im starting to Late update"); simulatedTime += 1.0f / targetFPS; //if (MOVEMENT_CONTROLLER == MovementController.AutoPilot) // simulatedWalker.WalkUpdate(); UpdateCurrentUserState(); CalculateStateChanges(); // BACK UP IN CASE UNITY TRIGGERS FAILED TO COMMUNICATE RESET (Can happen in high speed simulations) if (resetter != null && !inReset && resetter.IsUserOutOfBounds()) { Debug.LogWarning("Reset Aid Helped!"); OnResetTrigger(); } if (inReset) { if (resetter != null) { resetter.ApplyResetting(); } } else { if (redirector != null) { //Debug.Log("Hi im about to apply redirection"); redirector.ApplyRedirection(); //Debug.Log("Hi i just applied redirection"); } } statisticsLogger.UpdateStats(); UpdatePreviousUserState(); UpdateBodyPose(); //Debug.Log("Hi im finishing "); }
protected virtual void LateUpdate() { simulatedTime += 1.0f / targetFPS; //if (MOVEMENT_CONTROLLER == MovementController.AutoPilot) // simulatedWalker.WalkUpdate(); UpdateCurrentUserState(); CalculateStateChanges(); // BACK UP IN CASE UNITY TRIGGERS FAILED TO COMMUNICATE RESET (Can happen in high speed simulations) if (resetter != null && !inReset && resetter.IsUserOutOfBounds()) { //Debug.LogWarning("Reset Aid Helped!"); OnResetTrigger(); } if (inReset) { if (resetter != null) { resetter.ApplyResetting(); } } else { if (redirector != null) { redirector.ApplyRedirection(); } } statisticsLogger.UpdateStats(); UpdatePreviousUserState(); // DISABLED: What is the point of this function? Headfollower already does this //UpdateBodyPose(); }