tensor must be larger than zero in all coordinates

Discussion and help for Easy Save 3
Post Reply
McGravity
Posts: 19
Joined: Sun Aug 02, 2015 12:56 pm

tensor must be larger than zero in all coordinates

Post by McGravity »

Hi, I'm getting the error from the title when loading a RigidBody.

Unity 2020.3.15f2
ES 3.3.2f7

Here is the callstack:

Code: Select all

Inertia tensor must be larger than zero in all coordinates.
UnityEngine.Rigidbody:set_inertiaTensor (UnityEngine.Vector3)
ES3Types.ES3Type_Rigidbody:ReadComponent<UnityEngine.Component> (ES3Reader,object) (at Assets/Plugins/Easy Save 3/Scripts/Types/Unity Types/Component Types/ES3Type_Rigidbody.cs:91)
ES3Types.ES3ComponentType:ReadUnityObject<UnityEngine.Component> (ES3Reader,object) (at Assets/Plugins/Easy Save 3/Scripts/Types/ES3ComponentType.cs:36)
ES3Types.ES3UnityObjectType:ReadObject<UnityEngine.Component> (ES3Reader,object) (at Assets/Plugins/Easy Save 3/Scripts/Types/ES3UnityObjectType.cs:65)
ES3Types.ES3ObjectType:ReadInto<UnityEngine.Component> (ES3Reader,object) (at Assets/Plugins/Easy Save 3/Scripts/Types/ES3ObjectType.cs:77)
ES3Types.ES3Type_GameObject:ReadComponents (ES3Reader,UnityEngine.GameObject) (at Assets/Plugins/Easy Save 3/Scripts/Types/Unity Types/ES3Type_GameObject.cs:216)
ES3Types.ES3Type_GameObject:ReadObject<object> (ES3Reader,object) (at Assets/Plugins/Easy Save 3/Scripts/Types/Unity Types/ES3Type_GameObject.cs:167)
ES3Types.ES3ObjectType:ReadInto<object> (ES3Reader,object) (at Assets/Plugins/Easy Save 3/Scripts/Types/ES3ObjectType.cs:77)
ES3Types.ES3Type_GameObject:ReadObject<object> (ES3Reader) (at Assets/Plugins/Easy Save 3/Scripts/Types/Unity Types/ES3Type_GameObject.cs:131)
ES3Types.ES3ObjectType:Read<object> (ES3Reader) (at Assets/Plugins/Easy Save 3/Scripts/Types/ES3ObjectType.cs:54)
ES3Reader:ReadObject<object> (ES3Types.ES3Type) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:249)
ES3Reader:Read<object> (ES3Types.ES3Type) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:278)
ES3Types.ES3CollectionType:ReadICollection<object> (ES3Reader,System.Collections.Generic.ICollection`1<object>,ES3Types.ES3Type) (at Assets/Plugins/Easy Save 3/Scripts/Types/Collection Types/ES3CollectionType.cs:52)
ES3Types.ES3ArrayType:Read (ES3Reader) (at Assets/Plugins/Easy Save 3/Scripts/Types/Collection Types/ES3ArrayType.cs:36)
ES3Reader:Read<UnityEngine.GameObject[]> (ES3Types.ES3Type) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:274)
ES3Reader:Read<UnityEngine.GameObject[]> (string,UnityEngine.GameObject[]) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:212)
ES3:Load<UnityEngine.GameObject[]> (string,UnityEngine.GameObject[],ES3Settings) (at Assets/Plugins/Easy Save 3/Scripts/ES3.cs:439)
ES3AutoSaveMgr:Load () (at Assets/Plugins/Easy Save 3/Scripts/Auto Save/ES3AutoSaveMgr.cs:85)
Fishing.Scripts.UI.SaveLoadManager:QuickLoad () (at Assets/Fishing/Scripts/UI/SaveLoadManager.cs:72)
UnityEngine.Events.UnityEvent:Invoke ()
Michsky.UI.ModernUIPack.ButtonManager:<Start>b__33_0 () (at Assets/Modern UI Pack/Scripts/Button/ButtonManager.cs:90)
UnityEngine.EventSystems.EventSystem:Update ()
Am I doing something wrong when saving?
User avatar
Joel
Moodkie Staff
Posts: 4824
Joined: Wed Nov 07, 2012 10:32 pm

Re: tensor must be larger than zero in all coordinates

Post by Joel »

Hi there,

We've had no reports of this, and I'm unable to replicate it at my end. Please could you replicate this in a new, empty project with a simple scene and private message it to me with step-by-step instructions.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
McGravity
Posts: 19
Joined: Sun Aug 02, 2015 12:56 pm

Re: tensor must be larger than zero in all coordinates

Post by McGravity »

Sorry for the late reply. I currently have no time to replicate this in an empty project. It proabably takes some time when this has never been reported.

For now I've added a workaround in Assets/Plugins/Easy Save 3/Scripts/Types/Unity Types/Component Types/ES3Type_Rigidbody.cs:

Code: Select all

case "inertiaTensor":
	Vector3 foo = reader.Read<UnityEngine.Vector3>(ES3Type_Vector3.Instance);
	if (foo.x > 0 || foo.y > 0 || foo.z > 0) instance.inertiaTensor = foo;
	break;
Post Reply