Search the Community
Showing results for tags 'unityengine'.
-
I'm getting a weird thing where the *compiler* claims a method exists that at *runtime* it throws an exception on and says it does not exist. It's this: System.MissingMethodException: Cannot find the requested method. at (wrapper managed-to-native) UnityEngine.QuaternionD:INTERNAL_CALL_LookRotation (Vector3d&,Vector3d&) at UnityEngine.QuaternionD.LookRotation (Vector3d forward, Vector3d upwards) [0x00000] in <filename unknown>:0 at kOS.Function.FunctionHeading.Execute (kOS.SharedObjects shared) [0x00000] in <filename unknown>:0 at kOS.Function.FunctionBase.Execute (kOS.Safe.SafeSharedObjects shared) [0x00000] in <filename unknown>:0 at kOS.Safe.Function.FunctionManager.CallFunction (System.String functionName) [0x00000] in <filename unknown>:0 at kOS.Safe.Execution.CPU.CallBuiltinFunction (System.String functionName) [0x00000] in <filename unknown>:0 at kOS.Safe.Compilation.OpcodeCall.StaticExecute (ICpu cpu, Boolean direct, System.Object destination, Boolean calledFromKOSDelegateCall) [0x00000] in <filename unknown>:0 at kOS.Safe.Compilation.OpcodeCall.Execute (ICpu cpu) [0x00000] in <filename unknown>:0 at kOS.Safe.Execution.CPU.ExecuteInstruction (IProgramContext context, Boolean doProfiling) [0x00000] in <filename unknown>:0 According to the compiler, UnityEngine.QuaternionD.LookRotation emphatically does exist, with those exact arguments. But at runtime it does not. I'm not sure what "INTERNAL_CALL" means, but I'm guessing it means "this isn't implemented in the normal C# way" or something like that. (i.e. maybe it's dropping down into some other language for that part, or doing something implemented in raw machine language instead of in the MSIL's opcodes?) This came about because I was trying to replace all our Quaternion usages with QuaternionD's because when working with large vectors (i.e. the distance from Kerbin to Duna, for example), the 32-bit precision of Quaternion's was beginning to multiply into rather big errors after several operations of using them to rotate those big vectors. But it looks like not everything that was implemented for Quaternion got re-implemented for QuaterionD''s. Am I going to have to resort to running my own matrix multiplications to perform rotations or is there some other solution to this?