• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by vverma9 · Mar 17 at 10:41 PM · cinema4d

Unity Cinemachine error: Assertion failed on expression: 'CompareApproximately(det, 1.0F, .005f)'

I am using the Cinemachine asset available on the Unity Asset Store and getting a bunch of exceptions. Although they don't seem to have any effect on my game as such, but still I'd prefer to get rid of them. The exceptions appear only when I unpause a paused game (using Time.timeScale), and not otherwise.

alt text

Stack trace of exceptions below:

Assertion failed: Assertion failed on expression: 'CompareApproximately(det, 1.0F, .005f)'

UnityEngine.Quaternion:FromToRotation(Vector3, Vector3)

Cinemachine.Utility.PositionPredictor:PredictPosition(Single) (at Assets/Cinemachine/Base/Runtime/Core/Predictor.cs:64)

Cinemachine.CinemachineFramingTransposer:MutateCameraState(CameraState&, Single) (at Assets/Cinemachine/Base/Runtime/Components/CinemachineFramingTransposer.cs:318)

Cinemachine.CinemachineVirtualCamera:CalculateNewState(Vector3, Single) (at Assets/Cinemachine/Base/Runtime/Behaviours/CinemachineVirtualCamera.cs:426)

Cinemachine.CinemachineVirtualCamera:UpdateCameraState(Vector3, Single) (at Assets/Cinemachine/Base/Runtime/Behaviours/CinemachineVirtualCamera.cs:128)

Cinemachine.CinemachineCore:UpdateVirtualCamera(ICinemachineCamera, Vector3, Single) (at Assets/Cinemachine/Base/Runtime/Core/CinemachineCore.cs:237)

Cinemachine.CinemachineCore:UpdateAllActiveVirtualCameras(Vector3, Single) (at Assets/Cinemachine/Base/Runtime/Core/CinemachineCore.cs:165)

Cinemachine.CinemachineBrain:UpdateVirtualCameras(UpdateFilter, Single) (at Assets/Cinemachine/Base/Runtime/Behaviours/CinemachineBrain.cs:445)

Cinemachine.CinemachineBrain:LateUpdate() (at Assets/Cinemachine/Base/Runtime/Behaviours/CinemachineBrain.cs:399)

Below is the script responsible for pausing and unpausing the game:

 public void PauseGame()
 {
     if (pauseMenuCanvas)
     {
         Time.timeScale = 0f;
         pauseKeyDisabled = true;
         if (pauseMenuPanel)
         {
             pauseMenuPanel.SetActive(true);
             pauseMenuPanel.GetComponent<CanvasGroup>().interactable = true;
             if (pauseMenuPanelAnimator == null)
                 pauseMenuPanelAnimator = pauseMenuPanel.GetComponent<Animator>();
             pauseMenuPanelAnimator.SetTrigger("Open");
             if (!helptextPopulated)
             {
                 helptextPopulated = true;
                 helptext.text += "\n\n<align=left>" + GameSession.contentInfotext;
             }
         }
     }
     gamePaused = true;
     pauseKeyDisabled = false;
 }
 IEnumerator UnPauseCoRoutine()
 {
     pauseKeyDisabled = true;
     Time.timeScale = 1;
 
     if (pauseMenuPanel.activeSelf)
     {
         pauseMenuPanelAnimator.SetTrigger("Close");
         pauseMenuPanel.GetComponent<CanvasGroup>().interactable = false;
     }
     if (helpPanel.activeSelf)
     {
         if (helpPanelAnimator == null)
         {
             helpPanelAnimator = helpPanel.GetComponent<Animator>();
             helpPanel.GetComponent<CanvasGroup>().interactable = false;
         }
         helpPanelAnimator.SetTrigger("Close");
     }
     if (audioPanel.activeSelf)
     {
         if (audioPanelAnimator == null)
         {
             audioPanel.GetComponent<CanvasGroup>().interactable = false;
             audioPanelAnimator = audioPanel.GetComponent<Animator>();
         }
         audioPanelAnimator.SetTrigger("Close");
     }
     RuntimeAnimatorController ac = pauseMenuPanelAnimator.runtimeAnimatorController;
     yield return new WaitForSeconds(ac.animationClips[0].length); // use any animation from the array, as all have same length
     pauseMenuPanel.SetActive(false);
     helpPanel.SetActive(false);
     audioPanel.SetActive(false);
     gamePaused = false;
     pauseKeyDisabled = false;
 }

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image vverma9 · Mar 25 at 07:13 AM 0
Share

SOme one help please.

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

102 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Importing Cinema 4D joints to Unity? 1 Answer

Losing frames when importing animation from c4d to unity 1 Answer

Cinema 4d friendly? 1 Answer

Another Cinema4D import weirdness 2 Answers

How to get the same good graphic as in Cinema 4d? 1 Answer

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges